Skip to content

Commit

Permalink
Merge pull request #546 from jtpio/backport-544
Browse files Browse the repository at this point in the history
Backport #544 to the 2.x branch
  • Loading branch information
krassowski authored Feb 27, 2021
2 parents 7131273 + 527c85d commit 6b1af49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/jupyterlab-lsp/src/features/highlights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ export class HighlightsCM extends CodeMirrorIntegration {
return;
}

if (root_position == null) {
console.warn('no root position available');
return;
}

const token = this.virtual_editor.get_token_at(root_position);

// if token has not changed, no need to update highlight, unless it is an empty token
Expand Down

0 comments on commit 6b1af49

Please sign in to comment.