Skip to content

Commit 0374228

Browse files
authored
fix(vue): HMR error (#5460)
* fix HMR error in vue this fixes `TypeError: originalSlots[slotName] is not a function` error during HMR in vue by ensuring the function exists. * Update get-children.js
1 parent adc99a5 commit 0374228

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/vue/get-children.js

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ function getChildren(originalSlots = {}, slidesRef, oldSlidesRef) {
2929
};
3030

3131
Object.keys(originalSlots).forEach((slotName) => {
32+
if (typeof originalSlots[slotName] !== 'function') return;
3233
const els = originalSlots[slotName]();
3334
getSlidesFromElements(els, slotName);
3435
});

0 commit comments

Comments
 (0)