From 4944e65f94116c54c15bfb45b6991d0873e1ffa3 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 7 Dec 2024 23:07:00 +0100 Subject: [PATCH] Inline a condition --- internal/reader/sanitizer/sanitizer.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/reader/sanitizer/sanitizer.go b/internal/reader/sanitizer/sanitizer.go index cd4207d3e30..5e31a6360ec 100644 --- a/internal/reader/sanitizer/sanitizer.go +++ b/internal/reader/sanitizer/sanitizer.go @@ -428,8 +428,7 @@ func sanitizeSrcsetAttr(baseURL, value string) string { imageCandidates := ParseSrcSetAttribute(value) for _, imageCandidate := range imageCandidates { - absoluteURL, err := urllib.AbsoluteURL(baseURL, imageCandidate.ImageURL) - if err == nil { + if absoluteURL, err := urllib.AbsoluteURL(baseURL, imageCandidate.ImageURL); err == nil { imageCandidate.ImageURL = absoluteURL } }