diff options
author | kumavis <kumavis@users.noreply.github.com> | 2016-07-19 09:11:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-19 09:11:40 +0800 |
commit | a174ec7fc1423e0ba81e39dc78faa42533b51b45 (patch) | |
tree | 67127936b537a787651069315aa48182585e374d | |
parent | 5b895c2a229555f127e1bd4b6f5c2973a37537cc (diff) | |
parent | b2afa16925227fbb39e30fce8f9f4bca09dec20e (diff) | |
download | tangerine-wallet-browser-a174ec7fc1423e0ba81e39dc78faa42533b51b45.tar tangerine-wallet-browser-a174ec7fc1423e0ba81e39dc78faa42533b51b45.tar.gz tangerine-wallet-browser-a174ec7fc1423e0ba81e39dc78faa42533b51b45.tar.bz2 tangerine-wallet-browser-a174ec7fc1423e0ba81e39dc78faa42533b51b45.tar.lz tangerine-wallet-browser-a174ec7fc1423e0ba81e39dc78faa42533b51b45.tar.xz tangerine-wallet-browser-a174ec7fc1423e0ba81e39dc78faa42533b51b45.tar.zst tangerine-wallet-browser-a174ec7fc1423e0ba81e39dc78faa42533b51b45.zip |
Merge pull request #465 from MetaMask/i447
inpage - add try/catch to cleanContextForImports
-rw-r--r-- | app/scripts/inpage.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js index f5e54cd7b..055235671 100644 --- a/app/scripts/inpage.js +++ b/app/scripts/inpage.js @@ -53,9 +53,17 @@ var __define function cleanContextForImports () { __define = global.define - delete global.define + try { + delete global.define + } catch (_) { + console.warn('MetaMask - global.define could not be deleted.') + } } function restoreContextAfterImports () { - global.define = __define + try { + global.define = __define + } catch (_) { + console.warn('MetaMask - global.define could not be overwritten.') + } } |