@@ -274,19 +274,21 @@ export class NSLocationStrategy extends LocationStrategy {
274
274
275
275
// Methods for syncing with page navigation in PageRouterOutlet
276
276
public _beginBackPageNavigation ( name : string ) {
277
- routerLog ( "NSLocationStrategy.startGoBack()" ) ;
278
277
if ( this . _isPageNavigationBack ) {
279
- throw new Error ( "Calling startGoBack while going back." ) ;
278
+ routerLog ( "Warn: Attempted to call startGoBack while going back. Ignoring." ) ;
279
+ return ;
280
280
}
281
+ routerLog ( "NSLocationStrategy.startGoBack()" ) ;
281
282
this . _isPageNavigationBack = true ;
282
283
this . currentOutlet = name ;
283
284
}
284
285
285
286
public _finishBackPageNavigation ( ) {
286
- routerLog ( "NSLocationStrategy.finishBackPageNavigation()" ) ;
287
287
if ( ! this . _isPageNavigationBack ) {
288
- throw new Error ( "Calling endGoBack while not going back." ) ;
288
+ routerLog ( "Warn: Attempted to call endGoBack while not going back. Ignoring." ) ;
289
+ return ;
289
290
}
291
+ routerLog ( "NSLocationStrategy.finishBackPageNavigation()" ) ;
290
292
this . _isPageNavigationBack = false ;
291
293
}
292
294
@@ -306,18 +308,20 @@ export class NSLocationStrategy extends LocationStrategy {
306
308
}
307
309
308
310
public _beginCloseModalNavigation ( ) : void {
309
- routerLog ( "NSLocationStrategy.startCloseModal()" ) ;
310
311
if ( this . _isModalClosing ) {
311
- throw new Error ( "Calling startCloseModal while closing modal." ) ;
312
+ routerLog ( "Warn: Attempted to call startCloseModal while closing modal. Ignoring." ) ;
313
+ return ;
312
314
}
315
+ routerLog ( "NSLocationStrategy.startCloseModal()" ) ;
313
316
this . _isModalClosing = true ;
314
317
}
315
318
316
319
public _finishCloseModalNavigation ( ) {
317
- routerLog ( "NSLocationStrategy.finishCloseModalNavigation()" ) ;
318
320
if ( ! this . _isModalClosing ) {
319
- throw new Error ( "Calling startCloseModal while not closing modal." ) ;
321
+ routerLog ( "Warn: Attempted to call startCloseModal while not closing modal. Ignoring." ) ;
322
+ return ;
320
323
}
324
+ routerLog ( "NSLocationStrategy.finishCloseModalNavigation()" ) ;
321
325
this . _isModalClosing = false ;
322
326
}
323
327
0 commit comments