Skip to content

Commit

Permalink
Fix reading null WH query modelInfo (#224969)
Browse files Browse the repository at this point in the history
fix reading null modelInfo
  • Loading branch information
Yoyokrazy authored Aug 6, 2024
1 parent 3b0671e commit 8087dd8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ class WordHighlighter {
// 1) we have text focus, and a valid query was updated.
// 2) we do not have text focus, and a valid query is cached.
// the query will ALWAYS have the correct data for the current highlight request, so it can always be passed to the workerRequest safely
if (!WordHighlighter.query.modelInfo || WordHighlighter.query.modelInfo.model.isDisposed()) {
if (!WordHighlighter.query || !WordHighlighter.query.modelInfo || WordHighlighter.query.modelInfo.model.isDisposed()) {
return;
}
this.workerRequest = this.computeWithModel(WordHighlighter.query.modelInfo.model, WordHighlighter.query.modelInfo.selection, WordHighlighter.query.word, otherModelsToHighlight);
Expand Down

0 comments on commit 8087dd8

Please sign in to comment.