Skip to content

Commit

Permalink
Add sanity checks to dom renderer underline code
Browse files Browse the repository at this point in the history
Fixes #1860
  • Loading branch information
Tyriar committed Dec 26, 2018
1 parent 272cb08 commit 9e3e724
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/renderer/dom/DomRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,11 @@ export class DomRenderer extends EventEmitter implements IRenderer {
return;
}
const span = <HTMLElement>row.children[x];
span.style.textDecoration = enabled ? 'underline' : 'none';
x = (x + 1) % cols;
if (x === 0) {
if (span) {
span.style.textDecoration = enabled ? 'underline' : 'none';
}
if (++x >= cols) {
x = 0;
y++;
}
}
Expand Down

0 comments on commit 9e3e724

Please sign in to comment.