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:
parent
242d7e1e03
commit
35787a3d06
1 changed files with 5 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue