This commit is contained in:
David Taylor
2024-12-19 08:14:36 +00:00
parent 9a212c3d82
commit ddfe1ea061
2 changed files with 3 additions and 1 deletions

View File

@@ -714,7 +714,7 @@ module ApplicationHelper
modules_to_preload = EmberCli.route_bundles[ember_route_name]
modules_to_preload.map { |module_name| <<~HTML }.join("\n").html_safe
modules_to_preload&.map { |module_name| <<~HTML }&.join("\n")&.html_safe
<link rel="modulepreload" href="#{script_asset_path(module_name)}" />
HTML
end

View File

@@ -43,6 +43,8 @@ class EmberCli < ActiveSupport::CurrentAttributes
end
route_bundles
rescue Errno::ENOENT
{}
end
def self.deep_preloads_for(asset)