function proxy jank

This commit is contained in:
velzie 2024-10-28 21:07:38 -04:00
parent 39d880cbca
commit 16e0cc39c9
No known key found for this signature in database
GPG key ID: AA51AEFB0A1F3820
2 changed files with 6 additions and 7 deletions

View file

@ -4,11 +4,9 @@ import { rewriteJs } from "../../shared";
function rewriteFunction(ctx: ProxyCtx, client: ScramjetClient) {
const stringifiedFunction = ctx.call().toString();
const content = rewriteJs(
`return ${stringifiedFunction}`,
false,
client.meta
);
const content =
"return " + rewriteJs(`return ${stringifiedFunction}`, false, client.meta);
console.log(content);
ctx.return(ctx.fn(content)());
}

View file

@ -63,8 +63,9 @@ export default function (client: ScramjetClient, self: typeof globalThis) {
{},
{
set(t, p, v) {
console.log(p, v);
self[p] = v;
try {
self[p] = v;
} catch {}
return true;
},
}