dont fail if third party localStorage is not enaled, closes #1244
This commit is contained in:
parent
c5f038a526
commit
30253ddb9c
1 changed files with 4 additions and 2 deletions
|
@ -91,9 +91,11 @@ Ox.localStorage <f> localStorage wrapper
|
||||||
{}
|
{}
|
||||||
@*/
|
@*/
|
||||||
Ox.localStorage = function(namespace) {
|
Ox.localStorage = function(namespace) {
|
||||||
var localStorage = window.localStorage || {};
|
var localStorage;
|
||||||
// FF 3.6 can't assign to or iterate over localStorage
|
|
||||||
try {
|
try {
|
||||||
|
// this will fail if third party cookies/storage is not allowed
|
||||||
|
localStorage = window.localStorage || {};
|
||||||
|
// FF 3.6 can't assign to or iterate over localStorage
|
||||||
Ox.forEach(localStorage, function(value, key) {});
|
Ox.forEach(localStorage, function(value, key) {});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
localStorage = {};
|
localStorage = {};
|
||||||
|
|
Loading…
Reference in a new issue