From b5857a7cd0567db00a5f852092b4958f52468928 Mon Sep 17 00:00:00 2001 From: kfule Date: Tue, 1 Oct 2024 07:04:42 +0900 Subject: [PATCH] m.domFor(): workaround for unintentional mangling. Fix #2842 (#2981) --- render/domFor.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/render/domFor.js b/render/domFor.js index 705a510b0..16b17a972 100644 --- a/render/domFor.js +++ b/render/domFor.js @@ -2,9 +2,14 @@ var delayedRemoval = new WeakMap -function *domFor({dom, domSize}, {generation} = {}) { +function *domFor(vnode, object = {}) { + // To avoid unintended mangling of the internal bundler, + // parameter destructuring is not used here. + var dom = vnode.dom + var domSize = vnode.domSize + var generation = object.generation if (dom != null) do { - const {nextSibling} = dom + var nextSibling = dom.nextSibling if (delayedRemoval.get(dom) === generation) { yield dom @@ -19,4 +24,4 @@ function *domFor({dom, domSize}, {generation} = {}) { module.exports = { delayedRemoval: delayedRemoval, domFor: domFor, -} \ No newline at end of file +}