We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc3ee94 commit 2c9273aCopy full SHA for 2c9273a
1 file changed
src/vector/index.js
@@ -99,13 +99,15 @@ var lastLoadedScreen = null;
99
100
// This will be called whenever the SDK changes screens,
101
// so a web page can update the URL bar appropriately.
102
-var onNewScreen = function(screen) {
+var onNewScreen = function(screen, onlyIfBlank) {
103
if (!loaded) {
104
lastLoadedScreen = screen;
105
} else {
106
- var hash = '#/' + screen;
107
- lastLocationHashSet = hash;
108
- window.location.hash = hash;
+ if (!onlyIfBlank || !window.location.hash) {
+ var hash = '#/' + screen;
+ lastLocationHashSet = hash;
109
+ window.location.hash = hash;
110
+ }
111
}
112
113
0 commit comments