Update xtermFrontend.ts

This commit is contained in:
Eugene Pankov
2020-08-12 21:04:42 +02:00
parent 6773d260cf
commit 0e012a90ea

View File

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