diff --git a/Actions.js b/Actions.js index b193ce4a6..6f32fb6df 100644 --- a/Actions.js +++ b/Actions.js @@ -103,7 +103,7 @@ class Actions { router = router.parentRoute.parent; debug("Switching to parent router="+router.name); } else { - return false; + break; } } if (router.pop()){ diff --git a/Router.js b/Router.js index 705058275..eef27e885 100644 --- a/Router.js +++ b/Router.js @@ -200,7 +200,7 @@ export default class Router { pop(num: number = 1){ if (this._stack.length <= num){ - throw new Error("Cannot pop(), stack=["+this._stack+"]"); + return false; } this.nextRoute = null; if (this.delegate.onPop && this.delegate.onPop(num)){ @@ -219,4 +219,4 @@ export default class Router { function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); -} \ No newline at end of file +}