mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-03-05 00:10:54 -08:00
Fix Style/GuardClause in app/helpers (#35526)
This commit is contained in:
parent
2acc942bb4
commit
e183d7dd9a
2 changed files with 23 additions and 23 deletions
|
|
@ -24,24 +24,24 @@ module ThemeHelper
|
|||
end
|
||||
|
||||
def custom_stylesheet
|
||||
if active_custom_stylesheet.present?
|
||||
stylesheet_link_tag(
|
||||
custom_css_path(active_custom_stylesheet),
|
||||
host: root_url,
|
||||
media: :all,
|
||||
skip_pipeline: true
|
||||
)
|
||||
end
|
||||
return if active_custom_stylesheet.blank?
|
||||
|
||||
stylesheet_link_tag(
|
||||
custom_css_path(active_custom_stylesheet),
|
||||
host: root_url,
|
||||
media: :all,
|
||||
skip_pipeline: true
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def active_custom_stylesheet
|
||||
if cached_custom_css_digest.present?
|
||||
[:custom, cached_custom_css_digest.to_s.first(8)]
|
||||
.compact_blank
|
||||
.join('-')
|
||||
end
|
||||
return if cached_custom_css_digest.blank?
|
||||
|
||||
[:custom, cached_custom_css_digest.to_s.first(8)]
|
||||
.compact_blank
|
||||
.join('-')
|
||||
end
|
||||
|
||||
def cached_custom_css_digest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue