Skip to content

Commit

Permalink
wraping Webpacker::Manifest::MissingEntryError in safe_constantize to…
Browse files Browse the repository at this point in the history
… avoid trying to acces it in case webpacker is not used
  • Loading branch information
morozovm committed Sep 9, 2017
1 parent d4c9ce2 commit 82653d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/react_on_rails/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def self.server_bundle_js_file_path
bundle_name = ReactOnRails.configuration.server_bundle_js_file
@server_bundle_path = begin
bundle_js_file_path(bundle_name)
rescue Webpacker::Manifest::MissingEntryError
rescue ActiveSupport::Inflector.safe_constantize("Webpacker::Manifest::MissingEntryError")
Rails.root.join(File.join(Webpacker.config.public_output_path, bundle_name)).to_s
end
end
Expand Down

0 comments on commit 82653d9

Please sign in to comment.