fix illegal invocation pt 2

This commit is contained in:
velzie 2024-07-14 15:15:54 -04:00
parent 4fedcea1d4
commit 0b932ab5d4
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F

View file

@ -1,7 +1,7 @@
import { locationProxy } from "./location";
export const windowProxy = new Proxy(window, {
get(target, prop, reciever) {
get(target, prop) {
const propIsString = typeof prop === "string";
if (propIsString && prop === "location") {
return locationProxy;
@ -19,7 +19,7 @@ export const windowProxy = new Proxy(window, {
})
}
const value = Reflect.get(target, prop, reciever);
const value = Reflect.get(target, prop);
if (typeof value === "function") {
return value.bind(target);