Skip to content

Commit 50e7186

Browse files
committed
replace toSorted with sort equivalent (not in-place)
1 parent 4c99cd2 commit 50e7186

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)