Skip to content

Commit d0df09c

Browse files
Merge pull request #6 from 352Media/bug/uri-encoded-spaces
Decode `location.hash`.
2 parents 3ef942d + 83f98f3 commit d0df09c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dist/skilltree.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/skilltree.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,11 @@
238238
});
239239

240240
window.onhashchange = function () {
241-
self.useHash(window.location.hash.substr(1));
241+
self.useHash(decodeURI(window.location.hash.substr(1)));
242242
};
243243

244244
//Launch
245-
var currentHash = window.location.hash.substr(1);
245+
var currentHash = decodeURI(window.location.hash.substr(1));
246246
self.isOpen(currentHash != ''); //If there is a hash, open the skill tree by default
247247
self.useHash(currentHash);
248248

0 commit comments

Comments
 (0)