whatwg-url 16.0.0 → 16.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/URL-impl.js +2 -1
- package/package.json +1 -1
package/lib/URL-impl.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const usm = require("./url-state-machine");
|
|
3
3
|
const urlencoded = require("./urlencoded");
|
|
4
4
|
const URLSearchParams = require("./URLSearchParams");
|
|
5
|
+
const URL = require("./URL");
|
|
5
6
|
|
|
6
7
|
exports.implementation = class URLImpl {
|
|
7
8
|
// Unlike the spec, we duplicate some code between the constructor and canParse, because we want to give useful error
|
|
@@ -32,7 +33,7 @@ exports.implementation = class URLImpl {
|
|
|
32
33
|
|
|
33
34
|
static parse(globalObject, input, base) {
|
|
34
35
|
try {
|
|
35
|
-
return
|
|
36
|
+
return URL.createImpl(globalObject, [input, base]);
|
|
36
37
|
} catch {
|
|
37
38
|
return null;
|
|
38
39
|
}
|