Add verify for localForage
This commit is contained in:
parent
e9da2e6bd5
commit
a675d78d9b
@ -238,9 +238,13 @@ core.prototype.init = function (coreData, callback) {
|
|||||||
try {
|
try {
|
||||||
core.getLocalForage("__test__", null, function(data) {
|
core.getLocalForage("__test__", null, function(data) {
|
||||||
if (data!="__test__") {
|
if (data!="__test__") {
|
||||||
console.log("__test__ fail!");
|
console.log("localForage unsupported!");
|
||||||
core.platform.useLocalForage=false;
|
core.platform.useLocalForage=false;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
console.log("localForage supported!")
|
||||||
|
core.removeLocalForage("__test__");
|
||||||
|
}
|
||||||
}, function(e) {console.log(e); core.platform.useLocalForage=false;})
|
}, function(e) {console.log(e); core.platform.useLocalForage=false;})
|
||||||
}
|
}
|
||||||
catch (e) {console.log(e); core.platform.useLocalForage=false;}
|
catch (e) {console.log(e); core.platform.useLocalForage=false;}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user