lib/sewing_kit/webpack/helper.rb in sewing_kit-0.128.0 vs lib/sewing_kit/webpack/helper.rb in sewing_kit-0.129.0
- old
+ new
@@ -14,11 +14,11 @@
def sewing_kit_assets(entrypoint_name, extension: 'js')
return '' unless entrypoint_name.present?
assets = SewingKit::Webpack::Manifest.asset_dependencies(entrypoint_name, request.user_agent)
- raise UnknownAssetError, "#{entrypoint_name} was not found in manifest." if raise_unknown_error? assets
+ raise UnknownAssetError, "#{entrypoint_name} was not found in manifest." if raise_unknown_error?(assets)
return [] unless assets && assets[extension]
dependencies = assets[extension]
dependencies.unshift(dll_asset) if serve_development_assets? && extension == 'js'
dependencies.map do |raw_asset|
@@ -54,10 +54,10 @@
end
private
def create_asset_tag(tag_type, asset, tag_options)
- raise ArgumentError, "Invalid tag type: #{tag_type}" unless [:script, :link].include? tag_type
+ raise ArgumentError, "Invalid tag type: #{tag_type}" unless [:script, :link].include?(tag_type)
options = tag_options.clone
if tag_options[:integrity] && asset.integrity
options[:integrity] = asset.integrity