mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Avoid error calling buildHighlightIterator on a destroyed language mode
This commit is contained in:
@@ -107,6 +107,7 @@ class TreeSitterLanguageMode {
|
||||
*/
|
||||
|
||||
buildHighlightIterator () {
|
||||
if (!this.rootLanguageLayer) return new NullHighlightIterator()
|
||||
const layerIterators = [
|
||||
this.rootLanguageLayer.buildHighlightIterator(),
|
||||
...this.injectionsMarkerLayer.getMarkers().map(m => m.languageLayer.buildHighlightIterator())
|
||||
|
||||
Reference in New Issue
Block a user