Skip to content

Commit

Permalink
Fix: added optional chaining to account for fetch calls without optio…
Browse files Browse the repository at this point in the history
…nal settings (fixes #19). (#28)
  • Loading branch information
danielghost authored Feb 20, 2024
1 parent 9ec7891 commit 6ed321e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/fetch-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@
}

const xhr = new XMLHttpRequest();
const isAsync = !(init.keepalive || false);
const isAsync = !(init?.keepalive ?? false);

if (isAsync) {
function abortXhr() {
Expand Down

0 comments on commit 6ed321e

Please sign in to comment.