Ignore preferences with no scope

This commit is contained in:
Kevin Sawicki
2012-12-18 16:41:42 -08:00
parent 127174ebd0
commit 2c4ba3d3b1

View File

@@ -101,8 +101,10 @@ class TextMateBundle
console.warn "Failed to parse preference at path '#{preferencePath}'", e
else
{ scope, settings } = data[0]
return unless scope
for scope in scope.split(',')
scope = $.trim(scope)
continue unless scope
preferencesByScopeSelector[scope] = _.extend(preferencesByScopeSelector[scope] ? {}, settings)
preferencesByScopeSelector