This commit is contained in:
velzie 2024-08-31 11:52:00 -04:00
parent 08ccb4f56e
commit 7adf76d37f
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F
2 changed files with 48 additions and 37 deletions

View file

@ -103,14 +103,14 @@ export default function (client: ScramjetClient, self: typeof globalThis) {
return t;
};
client.Proxy("Promise.prototype.catch", {
apply(ctx) {
ctx.args[0] = new Proxy(ctx.args[0], {
apply(target, thisArg, argArray) {
// console.warn("CAUGHT PROMISE REJECTION", argArray);
Reflect.apply(target, thisArg, argArray);
},
});
},
});
// client.Proxy("Promise.prototype.catch", {
// apply(ctx) {
// ctx.args[0] = new Proxy(ctx.args[0], {
// apply(target, thisArg, argArray) {
// // console.warn("CAUGHT PROMISE REJECTION", argArray);
// Reflect.apply(target, thisArg, argArray);
// },
// });
// },
// });
}