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.
1 parent 30ae1f7 commit 53c692aCopy full SHA for 53c692a
nativescript-angular/router/ns-route-reuse-strategy.ts
@@ -79,7 +79,8 @@ export class NSRouteReuseStrategy implements RouteReuseStrategy {
79
80
const key = getSnapshotKey(route);
81
const isBack = this.location._isPageNavigatingBack();
82
- const shouldAttach = isBack && this.cache.peek().key === key;
+ const cachedItem = this.cache.peek();
83
+ const shouldAttach = isBack && cachedItem && cachedItem.key === key;
84
85
log(`shouldAttach isBack: ${isBack} key: ${key} result: ${shouldAttach}`);
86
0 commit comments