| Index: lib/url.js |
| diff --git a/lib/url.js b/lib/url.js |
| index 7614799423094d75f900f13e7f0cd35919c8b950..2c3a088edabd9c67fc98378c488a086cfacbe4d1 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)); |