about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorTakeshi Umeda <noel.yoshiba@gmail.com>2021-01-25 17:22:41 +0900
committerGitHub <noreply@github.com>2021-01-25 09:22:41 +0100
commit7f1c56954b46b26b4dadfa92047f1ee5d7f9ad0a (patch)
tree65c436cacfdacc935084d88c90502fd1c77b7c7b /app/services
parent4f05a43f8fe1396b12efc14115a628751dafe5d4 (diff)
Fix first return value of FetchLinkCardService.html method (#15630)
Diffstat (limited to 'app/services')
-rw-r--r--app/services/fetch_link_card_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb
index 255490d5c..74fe9a0a5 100644
--- a/app/services/fetch_link_card_service.rb
+++ b/app/services/fetch_link_card_service.rb
@@ -47,11 +47,11 @@ class FetchLinkCardService < BaseService
 
     Request.new(:get, @url).add_headers('Accept' => 'text/html', 'User-Agent' => Mastodon::Version.user_agent + ' Bot').perform do |res|
       if res.code == 200 && res.mime_type == 'text/html'
-        @html = res.body_with_limit
         @html_charset = res.charset
+        @html = res.body_with_limit
       else
-        @html = nil
         @html_charset = nil
+        @html = nil
       end
     end
   end