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; return;
} }
// Load the panel then call the next route. // Load the panel and stop processing routes.
$('.cms-container') $('.cms-container')
.entwine('ss') .entwine('ss')
.handleStateChange(null, ctx.state) .handleStateChange(null, ctx.state);
.done(next);
}); });
}); });

View File

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