Skip to content

Commit

Permalink
Fix NPE in DOM renderer underline
Browse files Browse the repository at this point in the history
Fixes #1747
  • Loading branch information
Tyriar committed Oct 11, 2018
1 parent b650db5 commit 9e1551e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/renderer/dom/DomRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,11 @@ export class DomRenderer extends EventEmitter implements IRenderer {

private _setCellUnderline(x: number, x2: number, y: number, y2: number, cols: number, enabled: boolean): void {
while (x !== x2 || y !== y2) {
const span = <HTMLElement>this._rowElements[y].children[x];
const row = this._rowElements[y];
if (!row) {
return;
}
const span = <HTMLElement>row.children[x];
span.style.textDecoration = enabled ? 'underline' : 'none';
x = (x + 1) % cols;
if (x === 0) {
Expand Down

0 comments on commit 9e1551e

Please sign in to comment.