Correct inverted logic for available image checks.

This commit is contained in:
Josh Matthews 2019-11-06 11:30:32 -05:00 committed by GitHub
parent a931a80cf5
commit 411890e27b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -927,10 +927,7 @@ impl HTMLImageElement {
*self.last_selected_source.borrow_mut() = selected_source.clone();
// Step 6, check the list of available images
if !selected_source
.as_ref()
.map_or(false, |source| source.is_empty())
{
if let Some(src) = selected_source {
if let Ok(img_url) = base_url.join(&src) {
let image_cache = window.image_cache();
let response = image_cache.find_image_or_metadata(