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