From ee48f4babaeafae4b145f29ce33ac49f5a9c1ea8 Mon Sep 17 00:00:00 2001 From: Nate Weaver Date: Sat, 15 Feb 2020 08:22:51 -0600 Subject: [PATCH] Remove redundant nil check for homePageURL --- Shared/Favicons/FaviconDownloader.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Shared/Favicons/FaviconDownloader.swift b/Shared/Favicons/FaviconDownloader.swift index aeb42f960..604db246b 100644 --- a/Shared/Favicons/FaviconDownloader.swift +++ b/Shared/Favicons/FaviconDownloader.swift @@ -177,11 +177,9 @@ final class FaviconDownloader { remainingFaviconURLs[homePageURL] = nil - if let url = singleFaviconDownloader.homePageURL { - if self.homePageToFaviconURLCache[url] == nil { - self.homePageToFaviconURLCache[url] = singleFaviconDownloader.faviconURL - self.homePageToFaviconURLCacheDirty = true - } + if self.homePageToFaviconURLCache[homePageURL] == nil { + self.homePageToFaviconURLCache[homePageURL] = singleFaviconDownloader.faviconURL + self.homePageToFaviconURLCacheDirty = true } postFaviconDidBecomeAvailableNotification(singleFaviconDownloader.faviconURL)