diff --git a/app/views/layouts/rails_admin/_head.html.erb b/app/views/layouts/rails_admin/_head.html.erb index d59e9d896..da63dbb81 100644 --- a/app/views/layouts/rails_admin/_head.html.erb +++ b/app/views/layouts/rails_admin/_head.html.erb @@ -19,8 +19,8 @@ <%= stylesheet_link_tag "rails_admin.css", media: :all, data: {'turbo-track': 'reload'} %> <%= javascript_inline_importmap_tag(RailsAdmin::Engine.importmap.to_json(resolver: self)) %> <%= javascript_importmap_module_preload_tags(RailsAdmin::Engine.importmap) %> - <%= javascript_importmap_shim_nonce_configuration_tag %> - <%= javascript_importmap_shim_tag %> + <%= javascript_importmap_shim_nonce_configuration_tag if respond_to? :javascript_importmap_shim_nonce_configuration_tag %> + <%= javascript_importmap_shim_tag if respond_to? :javascript_importmap_shim_tag %> <%= # Preload jQuery and make it global, unless jQuery UI fails to initialize tag.script "import jQuery from 'jquery'; window.jQuery = jQuery;".html_safe, type: "module" %> <%= javascript_import_module_tag 'rails_admin' %>