Skip to content

Commit 6d6a745

Browse files
fix: swap caches also when not writing route tree file (#4459)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent a8ee7ac commit 6d6a745

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/router-generator/src/generator.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ export class Generator {
424424
}
425425

426426
if (!writeRouteTreeFile) {
427+
this.swapCaches()
427428
return
428429
}
429430

@@ -473,7 +474,10 @@ export class Generator {
473474
}
474475
}
475476

476-
// now that we have finished this run, we can finally swap the caches
477+
this.swapCaches()
478+
}
479+
480+
private swapCaches() {
477481
this.routeNodeCache = this.routeNodeShadowCache
478482
this.routeNodeShadowCache = new Map()
479483
}

0 commit comments

Comments
 (0)