diff options
Fix extension tests
Diffstat (limited to 'app/scripts/lib/extension-instance.js')
-rw-r--r-- | app/scripts/lib/extension-instance.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/scripts/lib/extension-instance.js b/app/scripts/lib/extension-instance.js index e0e7c948b..b9d0ed06d 100644 --- a/app/scripts/lib/extension-instance.js +++ b/app/scripts/lib/extension-instance.js @@ -26,7 +26,10 @@ function Extension () { const _this = this apis.forEach(function (api) { - _this[api] = chrome ? chrome[api] : window[api] || browser.extension[api] + _this[api] = chrome !== undefined && chrome[api] ? chrome[api] + : window[api] ? window[api] + : browser && browser.extension && browser.extension[api] + ? browser.extension[api] : null }) } |