Default fileTypes to empty array when undefined

This is the case for certain grammars in the Java
TextMate bundle.
This commit is contained in:
Kevin Sawicki 2013-01-29 10:27:22 -08:00
parent 2001cc330f
commit b675e5b4ba

View File

@ -26,6 +26,7 @@ class TextMateGrammar
@initialRule = new Rule(this, {@scopeName, patterns})
@repository = {}
@firstLineRegex = new OnigRegExp(firstLineMatch) if firstLineMatch
@fileTypes ?= []
for name, data of repository
data = {patterns: [data], tempName: name} if data.begin? or data.match?