1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/.yarn/patches/lavamoat-core-npm-14.0.0-0f5bdac846.patch

17 lines
754 B
Diff
Raw Normal View History

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 {