Skip to content

Commit 11969fc

Browse files
committed
1 parent 042cc89 commit 11969fc

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,13 @@ class WordHighlighter {
401401
private renderDecorations(): void {
402402
this.renderDecorationsTimer = -1;
403403
let decorations: IModelDeltaDecoration[] = [];
404-
for (let i = 0, len = this.workerRequestValue.length; i < len; i++) {
405-
let info = this.workerRequestValue[i];
406-
decorations.push({
407-
range: info.range,
408-
options: WordHighlighter._getDecorationOptions(info.kind)
409-
});
404+
for (const info of this.workerRequestValue) {
405+
if (info.range) {
406+
decorations.push({
407+
range: info.range,
408+
options: WordHighlighter._getDecorationOptions(info.kind)
409+
});
410+
}
410411
}
411412

412413
this._decorationIds = this.editor.deltaDecorations(this._decorationIds, decorations);

0 commit comments

Comments
 (0)