Skip to content

Commit

Permalink
.concat().push(), .map().forEach()
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanblock committed Feb 20, 2024
1 parent 1824d2b commit f9cef95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit f9cef95

Please sign in to comment.