Skip to content

Commit

Permalink
remvoed Reflect as it caused issues with window proxy object
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubhakar-A committed Aug 17, 2023
1 parent 8d2b697 commit 2e728e4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/global/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2e728e4

Please sign in to comment.