From 0228b9e352430ccadd7f71abc3b5d899dd38ac9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jimmy=20W=C3=A4rting?= Date: Tue, 18 Jan 2022 22:39:43 +0100 Subject: [PATCH] revert if statement --- src/client.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); }