Fix xterm.js in headless mode yields TypeError on resize

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
This commit is contained in:
Oleksandr Andriienko
2018-02-12 12:30:26 +02:00
parent 1dbe7b3a8c
commit b5ba9ae771
+3 -1
View File
@@ -1889,7 +1889,9 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
this.rows = y;
this.buffers.setupTabStops(this.cols);
this.charMeasure.measure(this.options);
if (this.charMeasure) {
this.charMeasure.measure(this.options);
}
this.refresh(0, this.rows - 1);
this.emit('resize', {cols: x, rows: y});