Look at first character instead of indexOf call

This commit is contained in:
Kevin Sawicki
2014-04-22 09:35:14 -07:00
parent 3d10c3856b
commit 743e79b659

View File

@@ -68,7 +68,7 @@ class Syntax extends GrammarRegistry
getProperty: (scope, keyPath) ->
scopeChain = scope
.map (scope) ->
scope = ".#{scope}" unless scope.indexOf('.') is 0
scope = ".#{scope}" unless scope[0] is '.'
scope
.join(' ')
@propertyStore.getPropertyValue(scopeChain, keyPath)
@@ -76,7 +76,7 @@ class Syntax extends GrammarRegistry
propertiesForScope: (scope, keyPath) ->
scopeChain = scope
.map (scope) ->
scope = ".#{scope}" unless scope.indexOf('.') is 0
scope = ".#{scope}" unless scope[0] is '.'
scope
.join(' ')