mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Fix nil data passed to generated
This commit is contained in:
@@ -37,7 +37,8 @@ module Linguist
|
||||
#
|
||||
# Returns an Array of lines
|
||||
def lines
|
||||
@lines ||= data.split("\n", -1)
|
||||
# TODO: data should be required to be a String, no nils
|
||||
@lines ||= data ? data.split("\n", -1) : []
|
||||
end
|
||||
|
||||
# Internal: Is the blob a generated file?
|
||||
|
||||
Reference in New Issue
Block a user