Index: lib/url.js |
=================================================================== |
--- a/lib/url.js |
+++ b/lib/url.js |
@@ -29,17 +29,17 @@ |
* @param {?Frame} frame |
* @param {URL} [originUrl] |
* @return {string} |
*/ |
exports.extractHostFromFrame = (frame, originUrl) => |
{ |
for (; frame; frame = frame.parent) |
{ |
- let hostname = frame.url.hostname; |
+ let {hostname} = frame.url; |
if (hostname) |
return hostname; |
} |
return originUrl ? originUrl.hostname : ""; |
}; |
function isDomain(hostname) |