diff --git a/src/client.js b/src/client.js index 17ad5a2eb..51cf7a94d 100644 --- a/src/client.js +++ b/src/client.js @@ -60,7 +60,11 @@ exports.Request = Request; */ request.getXHR = () => { - if (root.XMLHttpRequest) { + if ( + root.XMLHttpRequest && + (!root.location || + root.location.protocol !== 'file:') + ) { return new XMLHttpRequest(); }