From d0953dcda953de70a5dae92d4c1ea28e2da84b93 Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Tue, 4 Aug 2020 14:10:25 -0400 Subject: [PATCH] DEV: Fix watching plugin stylesheet changes locally I broke this in e6dbb4fcf52fa74853ed45616dd7cbf620c7deca --- lib/stylesheet/watcher.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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