Skip to content

Commit 059f5c0

Browse files
jvoisinfguillot
authored andcommitted
Inline a condition
1 parent 58178d9 commit 059f5c0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/reader/sanitizer/sanitizer.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,7 @@ func sanitizeSrcsetAttr(baseURL, value string) string {
420420
imageCandidates := ParseSrcSetAttribute(value)
421421

422422
for _, imageCandidate := range imageCandidates {
423-
absoluteURL, err := urllib.AbsoluteURL(baseURL, imageCandidate.ImageURL)
424-
if err == nil {
423+
if absoluteURL, err := urllib.AbsoluteURL(baseURL, imageCandidate.ImageURL); err == nil {
425424
imageCandidate.ImageURL = absoluteURL
426425
}
427426
}

0 commit comments

Comments
 (0)