Skip to content

Commit 7022916

Browse files
authored
Minor robustness fixes for Bokeh models (#8270)
1 parent 6c06594 commit 7022916

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

panel/models/ace.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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 {

panel/models/react_component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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") || [])) {

0 commit comments

Comments
 (0)