mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1635054 - stop using ?. operator in newtab download manager code, r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D73623
This commit is contained in:
parent
595db05652
commit
d2b64e9c45
@ -36,7 +36,9 @@ this.DownloadsManager = class DownloadsManager {
|
||||
}
|
||||
|
||||
formatDownload(download) {
|
||||
let referrer = download.source.referrerInfo?.originalReferrer?.spec || null;
|
||||
let { referrerInfo } = download.source;
|
||||
let referrer = (referrerInfo && referrerInfo.originalReferrer) || null;
|
||||
referrer = (referrer && referrer.spec) || null;
|
||||
return {
|
||||
hostname: new URL(download.source.url).hostname,
|
||||
url: download.source.url,
|
||||
|
Loading…
Reference in New Issue
Block a user