Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit 6c6a6a2

Browse files
committed
url detection correction
1 parent 43182b0 commit 6c6a6a2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/wrapper-start.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@
8282
throw new TypeError('No environment baseURI');
8383
}
8484

85+
var URL = __global.URL;
8586
try {
86-
var URL = typeof __global.URL != 'undefined' && new URL('test:///').protocol == 'test:' && URL;
87+
new URL('test:///').protocol == 'test:';
88+
}
89+
catch(e) {
90+
URL = URLPolyfill;
8791
}
88-
catch(e) {}
89-
90-
URL = URL || URLPolyfill;

0 commit comments

Comments
 (0)