Skip to content

Conversation

@ProtoPlex
Copy link
Contributor

In some cases IE10-11 protected mode gives error "Access denied" when localStorage is accessed. Fallback is sessionStorage and then Memory.

try {
store = typeof window !== 'undefined' && v in window ? window[v] : undefined;
} catch (e) { console.log(v + ' error: ' + e) }
})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

if (store) return;
try {
store = typeof window !== 'undefined' && v in window ? window[v] : undefined;
} catch (e) { console.log(v + ' error: ' + e) }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

? window.localStorage
: Memory;
let store;
['localStorage', 'sessionStorage'].forEach( v => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

const store = typeof window !== 'undefined' && 'localStorage' in window
? window.localStorage
: Memory;
let store;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.02%) to 98.98% when pulling 149050e on ProtoPlex:master into 821955d on RobinCK:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.02%) to 98.98% when pulling 149050e on ProtoPlex:master into 821955d on RobinCK:master.

@RobinCK RobinCK changed the base branch from master to develop March 1, 2018 18:12
@RobinCK RobinCK merged commit dc1199b into RobinCK:develop Mar 1, 2018
@RobinCK
Copy link
Owner

RobinCK commented Mar 1, 2018

thanks
I'll fix the tests
after merge to master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants