From 7030f562e81ddb936b862f3d9a96b8c21ecbd08e Mon Sep 17 00:00:00 2001 From: 695137400 <695137400@qq.com> Date: Tue, 4 Aug 2020 18:21:26 +0800 Subject: [PATCH] Update xtermFrontend.ts console error --- terminus-terminal/src/frontends/xtermFrontend.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/terminus-terminal/src/frontends/xtermFrontend.ts b/terminus-terminal/src/frontends/xtermFrontend.ts index 5c4386ea..05e65071 100644 --- a/terminus-terminal/src/frontends/xtermFrontend.ts +++ b/terminus-terminal/src/frontends/xtermFrontend.ts @@ -110,7 +110,9 @@ export class XTermFrontend extends Frontend { let cols = Math.floor(l / actualCellWidth) let rows = Math.floor(i / actualCellHeight) - this.xterm.resize(cols, rows) + if(/[0-9]/gi.test(cols) && /[0-9]/gi.test(rows) ){ + this.xterm.resize(cols, rows); + } } } catch (e) { // tends to throw when element wasn't shown yet