Skip to content

Commit

Permalink
feat: add proxy and trapping checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Percslol committed Oct 27, 2024
1 parent e0a88ad commit 2b9afa1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ export class ScramjetClient {
const split = name.split(".");
const prop = split.pop();
const target = split.reduce((a, b) => a?.[b], this.global);
if (!target) return;
const original = Reflect.get(target, prop);
this.natives[name] = original;

Expand Down Expand Up @@ -362,6 +363,7 @@ export class ScramjetClient {
const split = name.split(".");
const prop = split.pop();
const target = split.reduce((a, b) => a?.[b], this.global);
if (!target) return;

const original = nativeGetOwnPropertyDescriptor(target, prop);
this.descriptors[name] = original;
Expand Down

0 comments on commit 2b9afa1

Please sign in to comment.