use call() more

This commit is contained in:
velzie 2024-08-31 14:53:28 -04:00
parent 95c080d3ca
commit 5790cfc1fb
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F
3 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,7 @@ import { ScramjetClient, ProxyCtx, Proxy } from "../client";
import { rewriteJs } from "../../shared";
function rewriteFunction(ctx: ProxyCtx) {
const stringifiedFunction = ctx.fn(...ctx.args).toString();
const stringifiedFunction = ctx.call().toString();
ctx.return(ctx.fn(`return ${rewriteJs(stringifiedFunction)}`)());
}