From 50e7186c05a3ac794e2a7c7008a2069a61c24065 Mon Sep 17 00:00:00 2001 From: George Wright Date: Thu, 17 Oct 2024 15:08:00 +0100 Subject: [PATCH] replace toSorted with sort equivalent (not in-place) --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index f66bca3..496f82d 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -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); }); }