Skip to content

Commit 8d60cd2

Browse files
authored
Merge pull request #1 from gwright170/pre-node-20-support
replace toSorted with sort equivalent (not in-place)
2 parents 4c99cd2 + 50e7186 commit 8d60cd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function linkPriority(module: Preload) {
9797
}
9898

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

0 commit comments

Comments
 (0)