Skip to content

Commit ff96c75

Browse files
committedMar 20, 2015
No loading code if the asset’s missing
1 parent 011f5f4 commit ff96c75

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

Diff for: ‎lib/opal/sprockets/processor.rb

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ def evaluate(context, locals, &block)
8686

8787
def self.load_asset_code(sprockets, name)
8888
asset = sprockets[name.sub(/(\.js)?$/, '.js')]
89+
return '' if asset.nil?
90+
8991
module_name = -> asset { asset.logical_path.sub(/\.js$/, '').inspect }
9092

9193
non_opal_assets = ([asset]+asset.dependencies).select do |a|

0 commit comments

Comments
 (0)
Please sign in to comment.