Check for presence rather than falsey when detecting tag color (#15356)
Fallback on empty string as well as nil to the site default tag color
This commit is contained in:
parent
09db50b296
commit
89ac6f1b5a
1 changed files with 1 additions and 1 deletions
|
|
@ -298,7 +298,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def render_tag_link(tag, filled: false, monochrome: false, classes: "")
|
||||
color = tag_colors(tag)[:background] || Settings::UserExperience.primary_brand_color_hex
|
||||
color = tag_colors(tag)[:background].presence || Settings::UserExperience.primary_brand_color_hex
|
||||
color_faded = Color::CompareHex.new([color]).opacity(0.1)
|
||||
label = safe_join([content_tag(:span, "#", class: "crayons-tag__prefix"), tag])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue