Call window.localStorage moved into try catch due to possibly exception in Edge.
This commit is contained in:
@@ -28,9 +28,9 @@ function LocalStorageManager() {
|
|||||||
|
|
||||||
LocalStorageManager.prototype.localStorageSupported = function () {
|
LocalStorageManager.prototype.localStorageSupported = function () {
|
||||||
var testKey = "test";
|
var testKey = "test";
|
||||||
var storage = window.localStorage;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
var storage = window.localStorage;
|
||||||
storage.setItem(testKey, "1");
|
storage.setItem(testKey, "1");
|
||||||
storage.removeItem(testKey);
|
storage.removeItem(testKey);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user