From ee1bc721c8cf48078412fd535e0626d5ecb6121f Mon Sep 17 00:00:00 2001 From: Garrett Moon Date: Thu, 8 Mar 2018 14:00:17 -0800 Subject: [PATCH] Hopefully made this a bit more readabl. (#823) --- Source/ASNetworkImageNode.mm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/ASNetworkImageNode.mm b/Source/ASNetworkImageNode.mm index 6cf70fa62..313b134cc 100755 --- a/Source/ASNetworkImageNode.mm +++ b/Source/ASNetworkImageNode.mm @@ -192,9 +192,10 @@ - (void)setURL:(NSURL *)URL resetToDefault:(BOOL)reset _URL = URL; - BOOL hasURL = (_URL == nil); - if (reset || hasURL) { - [self _locked_setCurrentImageQuality:(hasURL ? 0.0 : 1.0)]; + // If URL is nil and URL was not equal to _URL (checked at the top), then we previously had a URL but it's been nil'd out. + BOOL hadURL = (URL == nil); + if (reset || hadURL) { + [self _locked_setCurrentImageQuality:(hadURL ? 0.0 : 1.0)]; [self _locked__setImage:_defaultImage]; } }