revert bad fix to managing history

This commit is contained in:
Matthew Hodgson 2015-11-11 02:31:37 +01:00
parent 2fff6f4d5f
commit 2cae5e7a00
1 changed files with 4 additions and 6 deletions

View File

@ -99,17 +99,15 @@ var lastLoadedScreen = null;
// This will be called whenever the SDK changes screens, // This will be called whenever the SDK changes screens,
// so a web page can update the URL bar appropriately. // so a web page can update the URL bar appropriately.
var onNewScreen = function(screen, onlyIfBlank) { var onNewScreen = function(screen) {
if (!loaded) { if (!loaded) {
lastLoadedScreen = screen; lastLoadedScreen = screen;
} else { } else {
if (!onlyIfBlank || !window.location.hash) {
var hash = '#/' + screen; var hash = '#/' + screen;
lastLocationHashSet = hash; lastLocationHashSet = hash;
window.location.hash = hash; window.location.hash = hash;
} }
} }
}
// We use this to work out what URL the SDK should // We use this to work out what URL the SDK should
// pass through when registering to allow the user to // pass through when registering to allow the user to