From 0f66c6b25036dbbe5ca43775cf912fe94c2231ae Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 9 Oct 2024 10:38:19 -0700 Subject: [PATCH] Fixed error when Propshaft is installed but not used - fixes #483 --- CHANGELOG.md | 4 ++++ app/views/layouts/blazer/application.html.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a6ad3e05..ef495e5e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.0.5 (unreleased) + +- Fixed error when Propshaft is installed but not used + ## 3.0.4 (2024-09-04) - Improved CSP support diff --git a/app/views/layouts/blazer/application.html.erb b/app/views/layouts/blazer/application.html.erb index 93f71cf07..17a290402 100644 --- a/app/views/layouts/blazer/application.html.erb +++ b/app/views/layouts/blazer/application.html.erb @@ -5,7 +5,7 @@ <%= favicon_link_tag "blazer/favicon.png" %> - <% if defined?(Propshaft::Railtie) %> + <% if defined?(Propshaft::Railtie) && Rails.application.assets.is_a?(Propshaft::Assembly) %> <%= stylesheet_link_tag "blazer/bootstrap-propshaft", "blazer/bootstrap", "blazer/selectize", "blazer/github", "blazer/daterangepicker", "blazer/application" %> <%= javascript_include_tag "blazer/jquery", "blazer/rails-ujs", "blazer/stupidtable", "blazer/stupidtable-custom-settings", "blazer/jquery.stickytableheaders", "blazer/selectize", "blazer/highlight.min", "blazer/moment", "blazer/moment-timezone-with-data", "blazer/daterangepicker", "blazer/chart.umd", "blazer/chartjs-adapter-date-fns.bundle", "blazer/chartkick", "blazer/mapkick.bundle", "blazer/ace/ace", "blazer/ace/ext-language_tools", "blazer/ace/theme-twilight", "blazer/ace/mode-sql", "blazer/ace/snippets/text", "blazer/ace/snippets/sql", "blazer/Sortable", "blazer/bootstrap", "blazer/vue.global.prod", "blazer/routes", "blazer/queries", "blazer/fuzzysearch", "blazer/application", nonce: true %> <% else %>