mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 03:25:17 +01:00
Fix Style/SingleArgumentDig
cop in webpacker/manifest_extensions (#29929)
This commit is contained in:
parent
67dd1763bb
commit
bf5d948237
@ -250,11 +250,6 @@ Style/SignalException:
|
||||
- 'lib/devise/strategies/two_factor_ldap_authenticatable.rb'
|
||||
- 'lib/devise/strategies/two_factor_pam_authenticatable.rb'
|
||||
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Style/SingleArgumentDig:
|
||||
Exclude:
|
||||
- 'lib/webpacker/manifest_extensions.rb'
|
||||
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Mode.
|
||||
Style/StringConcatenation:
|
||||
|
@ -5,9 +5,9 @@ module Webpacker::ManifestExtensions
|
||||
asset = super
|
||||
|
||||
if pack_type[:with_integrity] && asset.respond_to?(:dig)
|
||||
[asset.dig('src'), asset.dig('integrity')]
|
||||
[asset['src'], asset['integrity']]
|
||||
elsif asset.respond_to?(:dig)
|
||||
asset.dig('src')
|
||||
asset['src']
|
||||
else
|
||||
asset
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user