Skip to content

Commit

Permalink
make sure default storage check is in try catch (prebid#2841)
Browse files Browse the repository at this point in the history
  • Loading branch information
snapwich authored and AlessandroDG committed Sep 13, 2018
1 parent a858d49 commit 58d260d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/debugging.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ export function getConfig(debugging) {
}
config.getConfig('debugging', ({debugging}) => getConfig(debugging));

export function sessionLoader(storage = window.sessionStorage) {
export function sessionLoader(storage) {
let overrides;
try {
storage = storage || window.sessionStorage;
overrides = JSON.parse(storage.getItem(OVERRIDE_KEY));
} catch (e) {
}
Expand Down

0 comments on commit 58d260d

Please sign in to comment.