Skip to content

Commit 4a81c84

Browse files
committed
Set default host on protocol==null
Some libraries set protocol to null instead of undefined, so we need to check for it here to allow default behaviour. Otherwise, we get the "Protocol not supported." error.
1 parent 17b03f9 commit 4a81c84

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/XMLHttpRequest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ exports.XMLHttpRequest = function() {
284284
break;
285285

286286
case undefined:
287+
case null:
287288
case "":
288289
host = "localhost";
289290
break;

0 commit comments

Comments
 (0)