diff --git a/terminus-terminal/src/frontends/xtermFrontend.ts b/terminus-terminal/src/frontends/xtermFrontend.ts index 05e65071..41c912ae 100644 --- a/terminus-terminal/src/frontends/xtermFrontend.ts +++ b/terminus-terminal/src/frontends/xtermFrontend.ts @@ -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