1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

Compare commits

..

2 commits

Author SHA1 Message Date
Ivan Evans
62ce568c21
Merge 9083f110c8 into 7495d51408 2024-09-23 22:13:47 -03:00
Cooper
7495d51408
Fix an error in fetch.ts (probably the source of these build issues) 2024-09-23 11:42:49 +00:00

View file

@ -69,7 +69,12 @@ export async function singularProxiedFetch<T>(
onResponse(context) { onResponse(context) {
const tokenHeader = context.response.headers.get("X-Token"); const tokenHeader = context.response.headers.get("X-Token");
if (tokenHeader) setApiToken(tokenHeader); if (tokenHeader) setApiToken(tokenHeader);
if (Array.isArray(ops.onResponse)) {
ops.onResponse.forEach((hook) => hook(context));
} else {
ops.onResponse?.(context); ops.onResponse?.(context);
}
}, },
}); });
} }