File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/resources/META-INF/frontend/fc-xterm Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ class FitAddon extends FitAddonBase {
3535 const super_fit = this . fit . bind ( this ) ;
3636 this . fit = ( ) => {
3737 super_fit ( ) ;
38- this . __unsetWidth ( ) ;
3938 requestAnimationFrame ( ( ) => this . __unsetWidth ( ) ) ;
4039 } ;
4140 }
4241
4342 __unsetWidth ( ) {
44- ( this . $ . node . terminal as any ) . _core . viewport . _viewportElement . style . width = 'unset' ;
43+ let viewport = ( this . $ . node . terminal as any ) . _core . viewport ;
44+ if ( viewport ) viewport . _viewportElement . style . width = 'unset' ;
4545 }
4646
4747 activate ( terminal : Terminal ) : void {
@@ -85,7 +85,7 @@ export function XTermFitMixin<TBase extends Constructor<TerminalMixin>>(Base: TB
8585
8686 fit ( ) {
8787 this . _fitAddon . proposeDimensions ( ) ;
88- window . requestAnimationFrame ( ( ) => {
88+ window . setTimeout ( ( ) => {
8989 try {
9090 this . _fitAddon ?. fit ( ) ;
9191 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments