File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
nativescript-angular/router Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -364,12 +364,10 @@ export class NSLocationStrategy extends LocationStrategy {
364
364
365
365
// currentOutlet should be the one that corresponds to the topmost() frame
366
366
const topmostOutlet = this . getOutletByFrame ( this . frameService . getFrame ( ) ) ;
367
- const currentOutlet = this . findOutletByModal ( this . _modalNavigationDepth , true ) || topmostOutlet ;
367
+ this . currentOutlet = this . findOutletByModal ( this . _modalNavigationDepth , true ) || topmostOutlet ;
368
368
369
- if ( currentOutlet ) {
370
- this . currentOutlet = currentOutlet ;
369
+ if ( this . currentOutlet ) {
371
370
this . currentOutlet . showingModal = false ;
372
-
373
371
this . callPopState ( this . currentOutlet . peekState ( ) , false ) ;
374
372
}
375
373
}
@@ -422,7 +420,11 @@ export class NSLocationStrategy extends LocationStrategy {
422
420
423
421
clearOutlet ( frame : Frame ) {
424
422
this . outlets = this . outlets . filter ( currentOutlet => {
425
- const isEqualToCurrent = currentOutlet . pathByOutlets === this . currentOutlet . pathByOutlets ;
423
+ let isEqualToCurrent ;
424
+
425
+ if ( this . currentOutlet ) {
426
+ isEqualToCurrent = currentOutlet . pathByOutlets === this . currentOutlet . pathByOutlets ;
427
+ }
426
428
427
429
// Remove outlet from the url tree.
428
430
if ( currentOutlet . frame === frame && ! isEqualToCurrent ) {
You can’t perform that action at this time.
0 commit comments