fix(core): fix throw if aborted polyfill (#10321)

This commit is contained in:
EYHN
2025-02-20 10:32:02 +00:00
parent ef28e36441
commit 4f831732e1
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
// because AbortSignal.throwIfAborted is not available in abortcontroller-polyfill
export function throwIfAborted(abort?: AbortSignal) {
if (abort?.aborted) {
throw new Error(abort.reason);
throw abort.reason;
}
return true;
}