Merge pull request #1861 from Tyriar/1860_style_npe
Add sanity checks to dom renderer underline code
This commit is contained in:
@@ -364,9 +364,11 @@ export class DomRenderer extends EventEmitter implements IRenderer {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const span = <HTMLElement>row.children[x];
|
const span = <HTMLElement>row.children[x];
|
||||||
span.style.textDecoration = enabled ? 'underline' : 'none';
|
if (span) {
|
||||||
x = (x + 1) % cols;
|
span.style.textDecoration = enabled ? 'underline' : 'none';
|
||||||
if (x === 0) {
|
}
|
||||||
|
if (++x >= cols) {
|
||||||
|
x = 0;
|
||||||
y++;
|
y++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user