Skip to content

Commit

Permalink
Check if charMeasure is defined in headless mode
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpoth committed Apr 12, 2018
1 parent 591b09a commit 5bccc5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1927,8 +1927,10 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT

if (x === this.cols && y === this.rows) {
// Check if we still need to measure the char size (fixes #785).
if (!this.charMeasure.width || !this.charMeasure.height) {
this.charMeasure.measure(this.options);
if (this.charMeasure) {
if (!this.charMeasure.width || !this.charMeasure.height) {
this.charMeasure.measure(this.options);
}
}
return;
}
Expand Down

0 comments on commit 5bccc5e

Please sign in to comment.