From 7a5a90b7ecd1ca024c7230d23ceaf2a24e6fc8f1 Mon Sep 17 00:00:00 2001 From: Frank Febbraro Date: Thu, 21 Jun 2018 09:20:32 -0700 Subject: [PATCH] removed the check for window/navigationDocument, instead relying on localStorage in the global context on all 'browser' based platforms --- src/browser.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/browser.js b/src/browser.js index 33ff11fe..5b7063e3 100644 --- a/src/browser.js +++ b/src/browser.js @@ -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) {} }