BUG Fix route invoking multiple handleStateChanges on single navigation actions

BUG Fix reference to non-existant window.history.state.url property
This commit is contained in:
Damian Mooyman 2016-07-13 14:42:57 +12:00
parent d54f4dc9c6
commit 7d82304bb0
2 changed files with 4 additions and 5 deletions

View File

@ -95,11 +95,10 @@ function appBoot() {
return;
}
// Load the panel then call the next route.
// Load the panel and stop processing routes.
$('.cms-container')
.entwine('ss')
.handleStateChange(null, ctx.state)
.done(next);
.handleStateChange(null, ctx.state);
});
});

View File

@ -529,8 +529,8 @@ $.entwine('ss', function($) {
this.setPauseState(true);
// Restore best last state
if (lastState !== null) {
window.ss.router.show(lastState.url);
if (lastState && lastState.path) {
window.ss.router.show(lastState.path);
} else {
window.ss.router.back();
}