diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-07-26 08:33:22 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-07-26 08:33:22 +0800 |
commit | be74589f49bbe977f881b17a0383cafa4336d9b4 (patch) | |
tree | 304192beee2c6a53827ca3593515c896f34f9941 /app/scripts/lib | |
parent | d484cb8f511a044c97a9a3bee3d4d415eb5988e7 (diff) | |
download | tangerine-wallet-browser-be74589f49bbe977f881b17a0383cafa4336d9b4.tar tangerine-wallet-browser-be74589f49bbe977f881b17a0383cafa4336d9b4.tar.gz tangerine-wallet-browser-be74589f49bbe977f881b17a0383cafa4336d9b4.tar.bz2 tangerine-wallet-browser-be74589f49bbe977f881b17a0383cafa4336d9b4.tar.lz tangerine-wallet-browser-be74589f49bbe977f881b17a0383cafa4336d9b4.tar.xz tangerine-wallet-browser-be74589f49bbe977f881b17a0383cafa4336d9b4.tar.zst tangerine-wallet-browser-be74589f49bbe977f881b17a0383cafa4336d9b4.zip |
Fix extension tests
Diffstat (limited to 'app/scripts/lib')
-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 }) } |