Skip to content

Commit

Permalink
Merge pull request #11347 from tchak/fix-abort-signal
Browse files Browse the repository at this point in the history
fix(js): check if AbortSignal.any is implemented
  • Loading branch information
tchak authored Feb 20, 2025
2 parents 56f7b4a + 87800b8 commit 89382ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/shared/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export function httpRequest(
init.body = JSON.stringify(json);
}

if (timeout != false && AbortSignal.timeout) {
if (timeout != false && AbortSignal.timeout && AbortSignal.any) {
const abortSignal = AbortSignal.timeout(timeout);
if (init.signal) {
init.signal = AbortSignal.any([init.signal, abortSignal]);
Expand Down

0 comments on commit 89382ac

Please sign in to comment.