Merge pull request #391 from zoff-music/fix/no-localstorage-error

Fix for localstorage not being existing crashes the player
This commit is contained in:
Kasper Rynning-Tønnesen
2018-09-20 16:32:38 +02:00
committed by GitHub
2 changed files with 2 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ var client = false;
var _VERSION;
try {
_VERSION = localStorage.getItem("VERSION");
if(_VERSION == null || _VERSION == undefined) throw "Some error";
} catch(e) {
_VERSION = 6;
}

View File

@@ -8,6 +8,7 @@ if(domain.length > 0 && domain[0] == "client") {
var _VERSION;
try {
_VERSION = localStorage.getItem("VERSION");
if(_VERSION == null || _VERSION == undefined) throw "Some error";
} catch(e) {
_VERSION = 6;
}