mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
fix illegal invocation pt 2
This commit is contained in:
parent
4fedcea1d4
commit
0b932ab5d4
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { locationProxy } from "./location";
|
import { locationProxy } from "./location";
|
||||||
|
|
||||||
export const windowProxy = new Proxy(window, {
|
export const windowProxy = new Proxy(window, {
|
||||||
get(target, prop, reciever) {
|
get(target, prop) {
|
||||||
const propIsString = typeof prop === "string";
|
const propIsString = typeof prop === "string";
|
||||||
if (propIsString && prop === "location") {
|
if (propIsString && prop === "location") {
|
||||||
return locationProxy;
|
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") {
|
if (typeof value === "function") {
|
||||||
return value.bind(target);
|
return value.bind(target);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue