Skip to content

Commit

Permalink
Merge pull request #1 from gwright170/pre-node-20-support
Browse files Browse the repository at this point in the history
replace toSorted with sort equivalent (not in-place)
  • Loading branch information
wille authored Oct 17, 2024
2 parents 4c99cd2 + 50e7186 commit 8d60cd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function linkPriority(module: Preload) {
}

export function sortPreloads(modules: Preload[]) {
return modules.toSorted((a, b) => {
return [...modules].sort((a, b) => {
return linkPriority(b) - linkPriority(a);
});
}

0 comments on commit 8d60cd2

Please sign in to comment.