Skip to content

Commit

Permalink
revert if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmywarting authored Jan 18, 2022
1 parent 2d686df commit 0228b9e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ exports.Request = Request;
*/

request.getXHR = () => {
if (root.XMLHttpRequest) {
if (
root.XMLHttpRequest &&
(!root.location ||
root.location.protocol !== 'file:')
) {
return new XMLHttpRequest();
}

Expand Down

0 comments on commit 0228b9e

Please sign in to comment.