Handle undefined rows or cols better

This commit is contained in:
Simon Lamon
2021-09-01 13:34:27 +00:00
parent 52d00a434e
commit aa046b73fb
3 changed files with 21 additions and 6 deletions
+2 -2
View File
@@ -36,8 +36,8 @@ export class BufferService extends Disposable implements IBufferService {
@IOptionsService private _optionsService: IOptionsService
) {
super();
this.cols = Math.max(_optionsService.options.cols, MINIMUM_COLS);
this.rows = Math.max(_optionsService.options.rows, MINIMUM_ROWS);
this.cols = Math.max(_optionsService.options.cols || 0, MINIMUM_COLS);
this.rows = Math.max(_optionsService.options.rows || 0, MINIMUM_ROWS);
this.buffers = new BufferSet(_optionsService, this);
}