Skip to content

Commit

Permalink
fix: explicitly set XHR to async mode (#1834)
Browse files Browse the repository at this point in the history
Some sites (Shopify) monkey patch a default synchronous XHR which causes
RudderStack SDK to crash because it's providing a `timeout` expecting
XHR to default to async mode.
  • Loading branch information
com4 authored Aug 26, 2024
1 parent 025306e commit 06f6a71
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const xhrRequest = (
}
};

xhr.open(options.method, options.url);
xhr.open(options.method, options.url, true);
if (options.withCredentials === true) {
xhr.withCredentials = true;
}
Expand Down

0 comments on commit 06f6a71

Please sign in to comment.