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

fix: ensure only nromalize a scoped slot when it is present

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

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

@@ -12,7 +12,9 @@ export function normalizeScopedSlots (
   } else {
     res = {}
     for (const key in slots) {
-      res[key] = normalizeScopedSlot(slots[key])
+      if (slots[key]) {
+        res[key] = normalizeScopedSlot(slots[key])
+      }
     }
   }
   // expose normal slots on scopedSlots