Catching one more edge case

This commit is contained in:
Arfon Smith
2015-08-11 06:48:54 +01:00
parent 851c93a1f7
commit 997c0fca10
2 changed files with 2 additions and 0 deletions

View File

@@ -242,6 +242,7 @@ module Linguist
#
# Returns the Language or nil if none was found.
def self.[](name)
return nil if name.to_s.empty?
name && (@index[name.downcase] || @index[name.split(',').first.downcase])
end