Skip to content

Commit

Permalink
replace toSorted with sort equivalent (not in-place)
Browse files Browse the repository at this point in the history
  • Loading branch information
gwright170 committed Oct 17, 2024
1 parent 4c99cd2 commit 50e7186
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 50e7186

Please sign in to comment.