Only load URL polyfill if needed
The URL polyfill is only required if window.URL lacks a constructor. 'js-polyfills/url' does have its own feature detection but relies on 'URL' being available at 'this.URL' which works when loaded independently but not when included as a CommonJS dependency. Adding our own feature test here should make it easier to avoid loading the polyfill entirely in future on browsers that support the URL constructor.
Showing
Please register or sign in to comment