inpage - add try/catch to cleanContextForImports

feature/default_network_editable
kumavis 8 years ago
parent 5b895c2a22
commit 9101812552
  1. 12
      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.')
}
}

Loading…
Cancel
Save