mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
fix showing/hiding of type widgets
This commit is contained in:
@@ -101,7 +101,7 @@ export default class NoteDetailWidget extends TabAwareWidget {
|
||||
this.toggle(true);
|
||||
|
||||
this.type = await this.getWidgetType();
|
||||
this.mime = this.note.mime;
|
||||
this.mime = this.note ? this.note.mime : null;
|
||||
|
||||
if (!(this.type in this.typeWidgets)) {
|
||||
const clazz = typeWidgetClasses[this.type];
|
||||
@@ -164,6 +164,8 @@ export default class NoteDetailWidget extends TabAwareWidget {
|
||||
|
||||
const noteComplement = await this.tabContext.getNoteComplement();
|
||||
|
||||
console.log(note, noteComplement);
|
||||
|
||||
if (utils.isHtmlEmpty(noteComplement.content)) {
|
||||
type = 'book';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user