DEV: Fix watching plugin stylesheet changes locally

I broke this in e6dbb4fcf52fa74853ed45616dd7cbf620c7deca
This commit is contained in:
Penar Musaraj
2020-08-04 14:10:25 -04:00
parent a1ec711373
commit d0953dcda9

View File

@ -111,12 +111,12 @@ module Stylesheet
targets = [plugin_name] targets = [plugin_name]
targets.push("#{plugin_name}_mobile") if DiscoursePluginRegistry.stylesheets_exists?(plugin_name, :mobile) targets.push("#{plugin_name}_mobile") if DiscoursePluginRegistry.stylesheets_exists?(plugin_name, :mobile)
targets.push("#{plugin_name}_desktop") if DiscoursePluginRegistry.stylesheets_exists?(plugin_name, :desktop) targets.push("#{plugin_name}_desktop") if DiscoursePluginRegistry.stylesheets_exists?(plugin_name, :desktop)
message = targets.map! do |name| message = targets.map! do |name|
msgs = [] msgs = []
active_themes.each do |theme_id| active_themes.each do |theme_id|
msgs << Stylesheet::Manager.stylesheet_data(name.to_sym, theme_id) msgs << Stylesheet::Manager.stylesheet_data(name.to_sym, theme_id)
end end
msgs
end.flatten! end.flatten!
MessageBus.publish '/file-change', message MessageBus.publish '/file-change', message
end end