We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66553a0 commit c549823Copy full SHA for c549823
client/gritty.js
@@ -5,6 +5,7 @@ require('xterm/css/xterm.css');
5
const {FitAddon} = require('xterm-addon-fit');
6
const {WebglAddon} = require('xterm-addon-webgl');
7
const currify = require('currify');
8
+const tryCatch = require('try-catch');
9
10
const getEl = require('./get-el');
11
const getHost = require('./get-host');
@@ -114,7 +115,10 @@ function _onTermData(socket, data) {
114
115
}
116
117
function _onWindowResize(fitAddon) {
- fitAddon.fit();
118
+ // Uncaught Error: This API only accepts integers
119
+ // when gritty mimized
120
+ const fit = fitAddon.fit.bind(fitAddon);
121
+ tryCatch(fit);
122
123
124
function connect(prefix, socketPath) {
0 commit comments