Commit e76f270b authored by Robert Knight's avatar Robert Knight

Fix installation of URL polyfill with js-polyfills v0.1.16

js-polyfills v0.1.15 used to install the polyfill on
`this.URL`, where `this` was set to module.exports in
the context of a Browserify bundle. Consequently the result
was available as `require('js-polyfills/url').URL`.

As of v0.1.16 however, it installs the polyfill on `self`,
which is the Window object in the context of the browser
and so `require('js-polyfills/url').URL` is undefined.

Fixes #3064
parent 2beba1af
...@@ -9,7 +9,7 @@ require('core-js/fn/object/assign'); ...@@ -9,7 +9,7 @@ require('core-js/fn/object/assign');
try { try {
new window.URL('https://hypothes.is'); new window.URL('https://hypothes.is');
} catch (err) { } catch (err) {
window.URL = require('js-polyfills/url').URL; require('js-polyfills/url');
} }
// document.evaluate() implementation, // document.evaluate() implementation,
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
"inherits": "^2.0.1", "inherits": "^2.0.1",
"is-equal-shallow": "^0.1.3", "is-equal-shallow": "^0.1.3",
"jquery": "1.11.1", "jquery": "1.11.1",
"js-polyfills": "^0.1.11", "js-polyfills": "^0.1.16",
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
"ng-tags-input": "2.2.0", "ng-tags-input": "2.2.0",
"node-uuid": "^1.4.3", "node-uuid": "^1.4.3",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment