From 0374228c2761201cf9895d30b34ea869cbc773ea Mon Sep 17 00:00:00 2001 From: Stefan Keim Date: Mon, 14 Feb 2022 08:50:00 +0100 Subject: [PATCH] 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 --- src/vue/get-children.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vue/get-children.js b/src/vue/get-children.js index 7fa79c8be..795363ad3 100644 --- a/src/vue/get-children.js +++ b/src/vue/get-children.js @@ -29,6 +29,7 @@ function getChildren(originalSlots = {}, slidesRef, oldSlidesRef) { }; Object.keys(originalSlots).forEach((slotName) => { + if (typeof originalSlots[slotName] !== 'function') return; const els = originalSlots[slotName](); getSlidesFromElements(els, slotName); });