Skip to content

Commit

Permalink
fix: execute callbacks asynchronously
Browse files Browse the repository at this point in the history
Addresses recent jQuery update to v3.4.1
  • Loading branch information
double-beep authored Jul 24, 2024
1 parent 47554c7 commit 334db3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function interceptXhr(): void {
const open = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function(): void {
this.addEventListener('load', () => {
callbacks.forEach(cb => cb(this));
callbacks.forEach(cb => setTimeout(() => cb(this)));
}, false);

// eslint-disable-next-line prefer-rest-params
Expand Down

0 comments on commit 334db3f

Please sign in to comment.