style: add note for future browser compatibility
This commit is contained in:
parent
8a282fe1de
commit
5558366390
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue