do something maybe possibly

master
Drake 2 years ago
parent 2eea259415
commit 3285513d3a

@ -6,7 +6,7 @@ function monkeyPatch(name, parentObj, patches) {
const handler = {
apply: (target, thisArg, [ctx, args]) => {
if (before !== undefined) before.apply(ctx, args);
res = (patches["instead"] !== undefined) ? instead.apply(ctx, [target.bind(ctx), ...args]) : target.apply(ctx, [...args])
res = (patches["instead"] !== undefined) ? instead.apply(ctx, [target.bind(ctx), ...args]) : target.apply(ctx, args)
if (after === undefined) return res
return after.apply(ctx, [res].concat(args));
}

Loading…
Cancel
Save