Update xtermFrontend.ts

console error
This commit is contained in:
695137400 2020-08-04 18:21:26 +08:00 committed by GitHub
parent 3d3fcc41b8
commit 7030f562e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +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)
this.xterm.resize(cols, rows) if(/[0-9]/gi.test(cols) && /[0-9]/gi.test(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