Selaa lähdekoodia

fix: avoid breaking avoriaz edge case

Evan You 7 vuotta sitten
vanhempi
commit
9011b83db7
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  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)