summaryrefslogtreecommitdiff
path: root/lib/internal/url.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/url.js')
-rw-r--r--lib/internal/url.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/internal/url.js b/lib/internal/url.js
index 08ae050b95..17af756668 100644
--- a/lib/internal/url.js
+++ b/lib/internal/url.js
@@ -238,9 +238,7 @@ function onParseComplete(flags, protocol, username, password,
}
function onParseError(flags, input) {
- const error = new ERR_INVALID_URL(input);
- error.input = input;
- throw error;
+ throw new ERR_INVALID_URL(input);
}
function onParseProtocolComplete(flags, protocol, username, password,