aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/scripts/inpage.js12
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.')
+ }
}