Kaynağa Gözat

fix: avoid breaking avoriaz edge case

Evan You 7 yıl önce
ebeveyn
işleme
9011b83db7

+ 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)