From da76ed9054f55e077e3b879c8d50806ff9d65399 Mon Sep 17 00:00:00 2001 From: Barney Date: Mon, 27 Jun 2022 15:24:54 +0100 Subject: [PATCH] Bundler can't parse multiple exports per module --- render/domFor.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/render/domFor.js b/render/domFor.js index f01c1e2b9..705a510b0 100644 --- a/render/domFor.js +++ b/render/domFor.js @@ -1,18 +1,22 @@ "use strict" var delayedRemoval = new WeakMap -module.exports.delayedRemoval = delayedRemoval -module.exports.domFor = function *domFor({dom, domSize}, {generation} = {}) { +function *domFor({dom, domSize}, {generation} = {}) { if (dom != null) do { const {nextSibling} = dom - + if (delayedRemoval.get(dom) === generation) { yield dom domSize-- } - + dom = nextSibling } while (domSize) } + +module.exports = { + delayedRemoval: delayedRemoval, + domFor: domFor, +} \ No newline at end of file