提交 883d83bf 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #30812 from ahorek/request_check

link tags shouldn't depend on the request
......@@ -91,7 +91,7 @@ def javascript_include_tag(*sources)
content_tag("script".freeze, "", tag_options)
}.join("\n").html_safe
request.send_early_hints("Link" => early_hints_links.join("\n"))
request.send_early_hints("Link" => early_hints_links.join("\n")) if respond_to?(:request)
sources_tags
end
......@@ -140,7 +140,7 @@ def stylesheet_link_tag(*sources)
tag(:link, tag_options)
}.join("\n").html_safe
request.send_early_hints("Link" => early_hints_links.join("\n"))
request.send_early_hints("Link" => early_hints_links.join("\n")) if respond_to?(:request)
sources_tags
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册