Skip to content

Commit

Permalink
Merge pull request #1280 from AndrienkoAleksandr/fixHeadlessMode
Browse files Browse the repository at this point in the history
Fix xterm.js in headless mode yields TypeError on resize
  • Loading branch information
Tyriar authored Feb 12, 2018
2 parents 1dbe7b3 + b5ba9ae commit cbe6c64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down

0 comments on commit cbe6c64

Please sign in to comment.