From f9cef950cf7ac482dc3ccff7ab008ffb46cb8fdf Mon Sep 17 00:00:00 2001 From: Ryan Block Date: Tue, 20 Feb 2024 08:19:24 -0800 Subject: [PATCH] =?UTF-8?q?`.concat()`=20=E2=86=92=20`.push()`,=20`.map()`?= =?UTF-8?q?=20=E2=86=92=20`.forEach()`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.mjs b/index.mjs index a15dbd0..90f7d5d 100644 --- a/index.mjs +++ b/index.mjs @@ -264,7 +264,7 @@ function fillSlots(node, template) { } } - unnamedSlots.map(([ slot, node ]) => { + unnamedSlots.forEach(([ slot, node ]) => { const children = node.childNodes .filter(node => !usedInserts.includes(node)) const slotParentChildNodes = slot.parentNode.childNodes @@ -337,7 +337,7 @@ function replaceSlots(node, slots) { childNodes: [] } - wrapperSpan.childNodes = wrapperSpan.childNodes.concat(slot.childNodes) + wrapperSpan.childNodes.push(...slot.childNodes) slot.childNodes.length = 0 slot.childNodes.push(wrapperSpan) }