Skip to content

Commit

Permalink
refactor(stencil): fix .sort() on readonly Node array
Browse files Browse the repository at this point in the history
  • Loading branch information
edbzn committed Oct 4, 2024
1 parent e8487f8 commit 300f50f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/stencil/src/stencil-core-utils/lib/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function addCodeIntoArray(

function getLastEntryOfOutputtargetArray(node: ts.Node): ts.Node {
const arrayEntryList = node.getChildren()[2].getChildren()[1].getChildren();
return arrayEntryList
return [...arrayEntryList]
.sort(
(first: ts.Node, second: ts.Node) => first.getStart() - second.getStart()
)
Expand Down

0 comments on commit 300f50f

Please sign in to comment.