Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Commit 7f1c569

Browse files
authored
Fix first return value of FetchLinkCardService.html method (mastodon#15630)
1 parent 4f05a43 commit 7f1c569

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/services/fetch_link_card_service.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ def html
4747

4848
Request.new(:get, @url).add_headers('Accept' => 'text/html', 'User-Agent' => Mastodon::Version.user_agent + ' Bot').perform do |res|
4949
if res.code == 200 && res.mime_type == 'text/html'
50-
@html = res.body_with_limit
5150
@html_charset = res.charset
51+
@html = res.body_with_limit
5252
else
53-
@html = nil
5453
@html_charset = nil
54+
@html = nil
5555
end
5656
end
5757
end

0 commit comments

Comments
 (0)