Fix bug with browser back button

This commit is contained in:
vladimir dashukevich
2018-06-06 00:56:51 +03:00
parent 7f7c4df188
commit 638c9cdadb
+3 -2
View File
@@ -83,9 +83,10 @@
function receiveMessages(event) {
try {
const data = typeof event.data === 'string' ? JSON.parse(event.data) : event.data;
const isItHash = data.hash && data.hash.indexOf("#") === 0;
if (data.hash) {
location.hash = data.hash;
if (isItHash) {
location.replace(data.hash);
}
} catch (e) {}
}