mirror of
https://github.com/atom/atom.git
synced 2026-01-26 07:19:06 -05:00
Fix error when injection points are added before grammars are loaded
This commit is contained in:
@@ -291,8 +291,9 @@ class GrammarRegistry {
|
||||
|
||||
forEachGrammar (callback) {
|
||||
this.textmateRegistry.grammars.forEach(callback)
|
||||
for (let grammarId in this.treeSitterGrammarsById) {
|
||||
callback(this.treeSitterGrammarsById[grammarId])
|
||||
for (const grammarId in this.treeSitterGrammarsById) {
|
||||
const grammar = this.treeSitterGrammarsById[grammarId]
|
||||
if (grammar.id) callback(grammar)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user