We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
splice
1 parent 36c9835 commit 2b3c398Copy full SHA for 2b3c398
packages/router/src/matcher/index.ts
@@ -366,17 +366,15 @@ export function createRouterMatcher(
366
// restore matcher order from cache
367
if (globalOptions.sortCache != null) {
368
try {
369
- const sorted = matchers.sort(
+ matchers.sort(
370
(a, b) =>
371
globalOptions!.sortCache![a.cacheKey!] -
372
globalOptions!.sortCache![b.cacheKey!]
373
)
374
375
- for (const entry of sorted) {
+ for (const entry of matchers) {
376
delete entry.cacheKey
377
}
378
-
379
- matchers.splice(0, matchers.length, ...sorted)
380
} catch {
381
console.log('Restore failure.')
382
0 commit comments