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

Commit 0ec110f

Browse files
committed
Safari URL detection fix (URL is an Object)
1 parent fe4ba34 commit 0ec110f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/wrapper-start.js

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

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

0 commit comments

Comments
 (0)