Skip to content

Commit

Permalink
removed the check for window/navigationDocument, instead relying on l…
Browse files Browse the repository at this point in the history
…ocalStorage in the global context on all 'browser' based platforms
  • Loading branch information
febbraro committed Jun 21, 2018
1 parent 8c14d21 commit 7a5a90b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,8 @@ function load() {
function localstorage() {
try {
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
if (typeof window === 'undefined' && typeof navigationDocument !== 'undefined') {
return localStorage;
}

return window.localStorage;
// The Browser also has localStorage in the global context.
return localStorage;
} catch (e) {}
}

Expand Down

0 comments on commit 7a5a90b

Please sign in to comment.