Skip to content

Commit f9652b6

Browse files
committed
fix: sort instead of toSorted
1 parent b9a762d commit f9652b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/svelte/src/compiler/phases/3-transform/client/transform-client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ export function client_component(analysis, options) {
458458
analysis.slot_names.size > 0;
459459

460460
// we hoist all the import declarations to the top of the file
461-
const body = [...module.body, ...state.hoisted].toSorted((body_a, body_b) =>
461+
const body = [...module.body, ...state.hoisted].sort((body_a, body_b) =>
462462
body_a.type === 'ImportDeclaration' ? -1 : 1
463463
);
464464

0 commit comments

Comments
 (0)