| Index: lib/url.js |
| diff --git a/lib/url.js b/lib/url.js |
| index 63782e88a550f0cd4b66a23e606f19ab0c00db2c..36dcf66ad62c24925ddb557a12c5dbe7ea3a817a 100644 |
| --- a/lib/url.js |
| +++ b/lib/url.js |
| @@ -32,7 +32,7 @@ let getDecodedHostname = |
| */ |
| exports.getDecodedHostname = url => |
| { |
| - let hostname = url.hostname; |
| + let {hostname} = url; |
| if (hostname.indexOf("xn--") == -1) |
| return hostname; |
| @@ -69,12 +69,11 @@ exports.extractHostFromFrame = frame => |
| */ |
| exports.stringifyURL = url => |
| { |
| - let protocol = url.protocol; |
| - let href = url.href; |
| + let {protocol, href} = url; |
| if (protocol == "http:" || protocol == "https:") |
| { |
| - let hostname = url.hostname; |
| + let {hostname} = url; |
| if (hostname.indexOf("xn--") != -1) |
| href = href.replace(hostname, punycode.toUnicode(hostname)); |