mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
Merge pull request #16575 from atom/ns-null-guard-scope-prefix
Null guard auto-prefixing of `.` to scopes for backward compatibility
This commit is contained in:
commit
9807e56154
@ -41,7 +41,7 @@ class ScopeDescriptor
|
|||||||
getScopeChain: ->
|
getScopeChain: ->
|
||||||
# For backward compatibility, prefix TextMate-style scope names with
|
# For backward compatibility, prefix TextMate-style scope names with
|
||||||
# leading dots (e.g. 'source.js' -> '.source.js').
|
# leading dots (e.g. 'source.js' -> '.source.js').
|
||||||
if @scopes[0].includes('.')
|
if @scopes[0]?.includes('.')
|
||||||
result = ''
|
result = ''
|
||||||
for scope, i in @scopes
|
for scope, i in @scopes
|
||||||
result += ' ' if i > 0
|
result += ' ' if i > 0
|
||||||
|
Loading…
Reference in New Issue
Block a user