mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 16:05:44 +08:00
FIX: Color scheme stylesheet not loaded when no default theme is set.
Follow-up to 8e3691d5370bb95d99fe750f46287763721fcc9c
This commit is contained in:
@ -269,23 +269,19 @@ class Stylesheet::Manager
|
||||
|
||||
theme = get_theme(theme_id)
|
||||
|
||||
if theme
|
||||
builder = Builder.new(
|
||||
target: target,
|
||||
theme: get_theme(theme_id),
|
||||
color_scheme: color_scheme,
|
||||
manager: self
|
||||
)
|
||||
builder = Builder.new(
|
||||
target: target,
|
||||
theme: get_theme(theme_id),
|
||||
color_scheme: color_scheme,
|
||||
manager: self
|
||||
)
|
||||
|
||||
builder.compile unless File.exists?(builder.stylesheet_fullpath)
|
||||
builder.compile unless File.exists?(builder.stylesheet_fullpath)
|
||||
|
||||
href = builder.stylesheet_path(current_hostname)
|
||||
stylesheet[:new_href] = href
|
||||
cache.defer_set(cache_key, stylesheet.freeze)
|
||||
stylesheet
|
||||
else
|
||||
{}
|
||||
end
|
||||
href = builder.stylesheet_path(current_hostname)
|
||||
stylesheet[:new_href] = href
|
||||
cache.defer_set(cache_key, stylesheet.freeze)
|
||||
stylesheet
|
||||
end
|
||||
|
||||
def color_scheme_stylesheet_link_tag(color_scheme_id = nil, media = 'all')
|
||||
|
Reference in New Issue
Block a user