fix: not being able to make requests on very old browsers (@fehmer) (#5711)

This commit is contained in:
Christian Fehmer 2024-08-01 13:30:03 +02:00 committed by GitHub
parent 8a09acd8d5
commit 482de29460
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,7 +28,7 @@ function buildApi(timeout: number): (args: ApiFetcherArgs) => Promise<{
headers["Authorization"] = `Bearer ${token}`;
}
const response = await fetch(request.path, {
signal: AbortSignal.timeout(timeout),
signal: AbortSignal?.timeout?.(timeout),
method: request.method as Method,
headers,
body: request.body,