Skip to content

Commit b67e10d

Browse files
authoredMar 24, 2021
fix: support for urls without protocol (#48)
1 parent 95c56e5 commit b67e10d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎filters/all.js

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ function port(url, defaultPort) {
118118
filter.port = port;
119119

120120
function stripProtocol(url) {
121+
if(!url.includes('://')){
122+
return url;
123+
}
121124
const u = new URL(url);
122125
return url.substr(u.protocol.length + 2);
123126
}

0 commit comments

Comments
 (0)
Please sign in to comment.