Skip to content

Commit

Permalink
Don't fail on empty assets (fixes Ortuna#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciopasquier committed May 3, 2015
1 parent 3523961 commit ef105be
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/padrino-pipeline/compilers/sprockets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ def clean_js
end

def compile_assets(type, extensions = [])
asset = assets[@config.send("#{type.to_s}_compiled_asset")]
extensions.each do |ext|
output_path = self.send("#{type.to_s}_output_path", "application-#{asset.digest}.#{ext}")
asset.write_to output_path
unless (asset = assets[@config.send("#{type.to_s}_compiled_asset")]).nil?
extensions.each do |ext|
output_path = self.send("#{type.to_s}_output_path", "application-#{asset.digest}.#{ext}")
asset.write_to output_path
end
end
end

Expand Down

0 comments on commit ef105be

Please sign in to comment.