1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

should explicitly returns nil in else clause

This commit is contained in:
kenta-s 2017-01-13 12:04:10 +09:00
parent 242d7e1e03
commit 35787a3d06

View file

@ -237,7 +237,11 @@ module ActionView
def compute_asset_extname(source, options = {})
return if options[:extname] == false
extname = options[:extname] || ASSET_EXTENSIONS[options[:type]]
extname if extname && File.extname(source) != extname
if extname && File.extname(source) != extname
extname
else
nil
end
end
# Maps asset types to public directory.