style: add note for future browser compatibility

This commit is contained in:
rugk 2022-06-12 21:34:37 +02:00 committed by GitHub
parent 8a282fe1de
commit 5558366390
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,6 +64,7 @@ export function fetch(input, init = {}, ...args) {
let abortTimeoutId;
if (!init.signal) {
// replace with AbortSignal.timeout(5000) if that is browser cross-compatible
abortTimeoutId = setTimeout(() => abortController.abort(), 5000);
init.signal = abortController.signal;
}