inpage - add try/catch to cleanContextForImports

feature/default_network_editable
kumavis 8 years ago
parent 5b895c2a22
commit 9101812552
  1. 8
      app/scripts/inpage.js

@ -53,9 +53,17 @@ var __define
function cleanContextForImports () {
__define = global.define
try {
delete global.define
} catch (_) {
console.warn('MetaMask - global.define could not be deleted.')
}
}
function restoreContextAfterImports () {
try {
global.define = __define
} catch {
console.warn('MetaMask - global.define could not be overwritten.')
}
}

Loading…
Cancel
Save