Update xtermFrontend.ts

This commit is contained in:
Eugene Pankov 2020-08-12 21:04:42 +02:00
parent 6773d260cf
commit 0e012a90ea
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -110,9 +110,9 @@ export class XTermFrontend extends Frontend {
let cols = Math.floor(l / actualCellWidth)
let rows = Math.floor(i / actualCellHeight)
if(/[0-9]/gi.test(cols) && /[0-9]/gi.test(rows) ){
this.xterm.resize(cols, rows);
}
if (!isNaN(cols) && !isNaN(rows)) {
this.xterm.resize(cols, rows)
}
}
} catch (e) {
// tends to throw when element wasn't shown yet