From 2e728e4b556c07332f0634323f65b8df526a64ff Mon Sep 17 00:00:00 2001 From: Shubhakar-A Date: Thu, 17 Aug 2023 14:15:18 +0530 Subject: [PATCH] remvoed Reflect as it caused issues with window proxy object --- lib/global/index.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/global/index.js b/lib/global/index.js index 8ad8a6f..4c08f9e 100644 --- a/lib/global/index.js +++ b/lib/global/index.js @@ -19,21 +19,20 @@ var getGlobal = function () { global import in all bundle use cases */ if (globalObj && globalObj.__esModule) { - const override = { - get: function (target, prop, receiver) { + const proxyGlobal = new Proxy(globalObj, { + get: function (target, prop) { if (prop === 'default') { return target } - return Reflect.get(receiver, prop, target) + return target[prop] }, - set: function (target, prop, value, receiver) { - Reflect.set(target, prop, value, receiver) + set: function (target, prop, value) { + target[prop] = value return true }, - }; - const proxyGlobal = new Proxy(globalObj, override) + }) return proxyGlobal } return globalObj