mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
8c550e78e9
Co-authored-by: Peter <53189696+PeterYinusa@users.noreply.github.com>
17 lines
754 B
Diff
17 lines
754 B
Diff
diff --git a/src/kernelCoreTemplate.js b/src/kernelCoreTemplate.js
|
|
index c9916f0889c17f850bffe8e5c02b3f804c9ed810..55edb49c936f28b928f74150c748fe80a9add896 100644
|
|
--- a/src/kernelCoreTemplate.js
|
|
+++ b/src/kernelCoreTemplate.js
|
|
@@ -138,9 +138,9 @@
|
|
continue
|
|
}
|
|
let desc = Object.getOwnPropertyDescriptor(globalRef, prop)
|
|
- if (desc?.configurable === true) {
|
|
+ if (desc && desc.configurable === true) {
|
|
desc = { configurable: false, set, get }
|
|
- } else if (desc?.writable === true) {
|
|
+ } else if (desc && desc.writable === true) {
|
|
const p = new Proxy(obj, { getPrototypeOf: get, get, set } )
|
|
desc = { configurable: false, writable: false, value: p }
|
|
} else {
|