Guard initial fit sizing
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -190,7 +190,13 @@ class WebTerminal {
|
||||
const maxAttempts = 120;
|
||||
|
||||
const attemptFitAndResize = (attempt: number) => {
|
||||
const dims = this.fitAddon.proposeDimensions();
|
||||
const dims = (() => {
|
||||
try {
|
||||
return this.fitAddon.proposeDimensions();
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
})();
|
||||
if (!dims) {
|
||||
if (attempt < maxAttempts) {
|
||||
window.requestAnimationFrame(() => attemptFitAndResize(attempt + 1));
|
||||
|
||||
Reference in New Issue
Block a user