Просмотр исходного кода

fix: avoid breaking avoriaz edge case

Evan You 7 лет назад
Родитель
Сommit
9011b83db7
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/core/vdom/helpers/normalize-scoped-slots.js

+ 3 - 1
src/core/vdom/helpers/normalize-scoped-slots.js

@@ -32,7 +32,9 @@ export function normalizeScopedSlots (
       res[key] = proxyNormalSlot(normalSlots, key)
     }
   }
-  if (slots) {
+  // avoriaz seems to mock a non-extensible $scopedSlots object
+  // and when that is passed down this would cause an error
+  if (Object.isExtensible(slots)) {
     (slots: any)._normalized = res
   }
   def(res, '$stable', slots ? !!slots.$stable : true)