fix stack thingy

This commit is contained in:
velzie 2024-08-30 17:09:18 -04:00
parent 5f77342d8d
commit a5889828bd
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F

View file

@ -194,7 +194,7 @@ export class ScramjetClient {
s[0].getFileName() &&
!s[0].getFileName().startsWith(location.origin + config.prefix)
) {
return s;
return { stack: err.stack };
}
};
@ -203,6 +203,8 @@ export class ScramjetClient {
} catch (err) {
if (err instanceof Error) {
if ((err.stack as any) instanceof Object) {
//@ts-expect-error i'm not going to explain this
err.stack = err.stack.stack;
console.error("ERROR FROM SCRMAJET INTERNALS", err);
} else {
throw err;