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

Commit

Permalink
Fix a configuration issue arising when config.assets.manifest is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
carsomyr committed Jul 9, 2017
1 parent 10b3c13 commit 8322604
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/requirejs/rails/engine.rb
Expand Up @@ -75,8 +75,8 @@ class Engine < ::Rails::Engine
if ::Rails::VERSION::MAJOR >= 4
config.after_initialize do |app|
config = app.config
rails_manifest = ::Sprockets::Manifest.new(app.assets, config.assets.manifest)
if config.requirejs.manifest_path.exist? && rails_manifest
if config.requirejs.manifest_path.exist?
rails_manifest = ::Sprockets::Railtie.build_manifest(app)
rjs_digests = YAML.load(ERB.new(File.new(config.requirejs.manifest_path).read).result)
rails_manifest.assets.merge!(rjs_digests)
ActionView::Base.instance_eval do
Expand Down

0 comments on commit 8322604

Please sign in to comment.