mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Look at first character instead of indexOf call
This commit is contained in:
@@ -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(' ')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user