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 {
108108 public constructor (
109109 { routes } : NSVueRouterOptions ,
110110 {
111- routeToCallback,
112- routeBackCallback,
111+ routeToCallback = null ,
112+ routeBackCallback = null ,
113113 routeBackFallbackPath = "" ,
114114 logger = null ,
115115 frame = null ,
@@ -458,11 +458,17 @@ export class RouterService {
458458 }
459459
460460 if ( isNavigatingBack ) {
461- this . routeBackCallback ( newRoute , routeOptions ) ;
461+ // Ensure that callback is specified
462+ if ( this . routeBackCallback ) {
463+ this . routeBackCallback ( newRoute , routeOptions ) ;
464+ }
462465
463466 this . vm . $navigateBack ( routeOptions ) ;
464467 } else {
465- this . routeToCallback ( newRoute , routeOptions ) ;
468+ // Ensure that callback is specified
469+ if ( this . routeToCallback ) {
470+ this . routeToCallback ( newRoute , routeOptions ) ;
471+ }
466472
467473 this . vm . $navigateTo ( newRoute . component , routeOptions ) ;
468474 }
You can’t perform that action at this time.
0 commit comments