Skip to content

Commit 7a5a90b

Browse files
committed
removed the check for window/navigationDocument, instead relying on localStorage in the global context on all 'browser' based platforms
1 parent 8c14d21 commit 7a5a90b

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/browser.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,8 @@ function load() {
169169
function localstorage() {
170170
try {
171171
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
172-
if (typeof window === 'undefined' && typeof navigationDocument !== 'undefined') {
173-
return localStorage;
174-
}
175-
176-
return window.localStorage;
172+
// The Browser also has localStorage in the global context.
173+
return localStorage;
177174
} catch (e) {}
178175
}
179176

0 commit comments

Comments
 (0)