Skip to content

A platform for community discussion. Free, open, simple.

DEV: Live-reloading of core/plugin CSS alongside preview_theme_id

David Taylor7c494cc631bd
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 069b3c097db..7940565ea5a 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -64,7 +64,7 @@ class ApplicationController < ActionController::Base
after_action :remember_theme_id
def remember_theme_id
- if @theme_ids.present?
+ if @theme_ids.present? && request.format == "html"
Stylesheet::Watcher.theme_id = @theme_ids.first if defined? Stylesheet::Watcher
end
end