From 9101812552f89439addfa4fbd783ec4bf6b47e0e Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 18 Jul 2016 17:57:23 -0700 Subject: inpage - add try/catch to cleanContextForImports --- app/scripts/inpage.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'app/scripts') diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js index f5e54cd7b..c2b445bd1 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.') + } } -- cgit v1.2.3