mirror of
https://github.com/discourse/discourse.git
synced 2025-06-13 18:04:35 +08:00
FIX: output css for category backgrounds only if uploads have a url
This commit is contained in:
@ -61,7 +61,7 @@ module Stylesheet
|
|||||||
register_import "category_backgrounds" do
|
register_import "category_backgrounds" do
|
||||||
contents = ""
|
contents = ""
|
||||||
Category.where('uploaded_background_id IS NOT NULL').each do |c|
|
Category.where('uploaded_background_id IS NOT NULL').each do |c|
|
||||||
contents << category_css(c) if c.uploaded_background
|
contents << category_css(c) if c.uploaded_background&.url.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
Import.new("categoy_background.scss", source: contents)
|
Import.new("categoy_background.scss", source: contents)
|
||||||
|
Reference in New Issue
Block a user