Skip to content

Build your personal knowledge base with Trilium Notes

fix(touchbar): errors refreshing touchbar if parent is missing

Elian Dorand6478c2fed95
diff --git a/src/public/app/widgets/type_widgets/editable_code.ts b/src/public/app/widgets/type_widgets/editable_code.ts
index 7b0891f3db..a17364502f 100644
--- a/src/public/app/widgets/type_widgets/editable_code.ts
+++ b/src/public/app/widgets/type_widgets/editable_code.ts
@@ -65,7 +65,9 @@ export default class EditableCodeTypeWidget extends AbstractCodeTypeWidget {
this.show();
- this.triggerCommand("refreshTouchBar");
+ if (this.parent) {
+ this.triggerCommand("refreshTouchBar");
+ }
}
getData() {