Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 0e85479

Browse files
committed
Fix a configuration issue arising when config.assets.manifest is nil
1 parent cf0989d commit 0e85479

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/requirejs/rails/engine.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ class Engine < ::Rails::Engine
7575
if ::Rails::VERSION::MAJOR >= 4
7676
config.after_initialize do |app|
7777
config = app.config
78-
rails_manifest = ::Sprockets::Manifest.new(app.assets, config.assets.manifest)
79-
if config.requirejs.manifest_path.exist? && rails_manifest
78+
if config.requirejs.manifest_path.exist?
79+
rails_manifest = ::Sprockets::Railtie.build_manifest(app)
8080
rjs_digests = YAML.load(ERB.new(File.new(config.requirejs.manifest_path).read).result)
8181
rails_manifest.assets.merge!(rjs_digests)
8282
ActionView::Base.instance_eval do

0 commit comments

Comments
 (0)