1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Merge pull request #465 from MetaMask/i447

inpage - add try/catch to cleanContextForImports
This commit is contained in:
kumavis 2016-07-18 18:11:40 -07:00 committed by GitHub
commit a174ec7fc1

View File

@ -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.')
}
}