mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 08:48:00 +08:00
FIX: embedded comments not working when theme is missing
This commit is contained in:
@ -41,10 +41,14 @@ class Stylesheet::Manager
|
||||
|
||||
@lock.synchronize do
|
||||
builder = self.new(target, theme_key)
|
||||
builder.compile unless File.exists?(builder.stylesheet_fullpath)
|
||||
tag = %[<link href="#{builder.stylesheet_path}" media="#{media}" rel="stylesheet" data-target="#{target}"/>]
|
||||
cache[cache_key] = tag
|
||||
if builder.is_theme? && !builder.theme
|
||||
tag = ""
|
||||
else
|
||||
builder.compile unless File.exists?(builder.stylesheet_fullpath)
|
||||
tag = %[<link href="#{builder.stylesheet_path}" media="#{media}" rel="stylesheet" data-target="#{target}"/>]
|
||||
end
|
||||
|
||||
cache[cache_key] = tag
|
||||
tag.dup.html_safe
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user