File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ export class RouterService {
108
108
public constructor (
109
109
{ routes } : NSVueRouterOptions ,
110
110
{
111
- routeToCallback,
112
- routeBackCallback,
111
+ routeToCallback = null ,
112
+ routeBackCallback = null ,
113
113
routeBackFallbackPath = "" ,
114
114
logger = null ,
115
115
frame = null ,
@@ -458,11 +458,17 @@ export class RouterService {
458
458
}
459
459
460
460
if ( isNavigatingBack ) {
461
- this . routeBackCallback ( newRoute , routeOptions ) ;
461
+ // Ensure that callback is specified
462
+ if ( this . routeBackCallback ) {
463
+ this . routeBackCallback ( newRoute , routeOptions ) ;
464
+ }
462
465
463
466
this . vm . $navigateBack ( routeOptions ) ;
464
467
} else {
465
- this . routeToCallback ( newRoute , routeOptions ) ;
468
+ // Ensure that callback is specified
469
+ if ( this . routeToCallback ) {
470
+ this . routeToCallback ( newRoute , routeOptions ) ;
471
+ }
466
472
467
473
this . vm . $navigateTo ( newRoute . component , routeOptions ) ;
468
474
}
You can’t perform that action at this time.
0 commit comments