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 {