Skip to content

Commit

Permalink
ONL-6389: fix: Prevent raising ProgressEvent when there is XHR error …
Browse files Browse the repository at this point in the history
…while loading inline SVGs. (#1100)
  • Loading branch information
mcibique authored Mar 7, 2022
1 parent b901e56 commit dd6bd6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/icons/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function getSprite(url) {
resolve(xhr.responseText);
}
};
xhr.onerror = function onSpriteError(err) {
reject(err);
xhr.onerror = function onSpriteError() {
reject(new Error(`Unexpected error when loading svg sprite. Status: ${xhr.status}`));
};
xhr.send();
}));
Expand Down

1 comment on commit dd6bd6e

@vercel
Copy link

@vercel vercel bot commented on dd6bd6e Mar 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.