File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,9 @@ export class AcePlotView extends HTMLBoxView {
126126 }
127127
128128 _update_theme ( ) : void {
129- this . _editor . setTheme ( `ace/theme/${ this . model . theme } ` )
129+ if ( this . _editor ) {
130+ this . _editor . setTheme ( `ace/theme/${ this . model . theme } ` )
131+ }
130132 }
131133
132134 _update_filename ( ) : void {
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ export class ReactComponentView extends ReactiveESMView {
9292 this . _force_update_callbacks = [ ]
9393 if ( this . react_root && this . use_shadow_dom ) {
9494 super . remove ( )
95- this . react_root . then ( ( root : any ) => root . unmount ( ) )
95+ this . react_root . then ( ( root : any ) => root && root . unmount ( ) )
9696 } else {
9797 this . _applied_stylesheets . forEach ( ( stylesheet ) => stylesheet . uninstall ( ) )
9898 for ( const cb of ( this . _lifecycle_handlers . get ( "remove" ) || [ ] ) ) {
You can’t perform that action at this time.
0 commit comments