diff --git a/src/public/app/widgets/type_widgets/abstract_split_type_widget.ts b/src/public/app/widgets/type_widgets/abstract_split_type_widget.ts index 72bb6bb23..3b1cb222b 100644 --- a/src/public/app/widgets/type_widgets/abstract_split_type_widget.ts +++ b/src/public/app/widgets/type_widgets/abstract_split_type_widget.ts @@ -168,10 +168,10 @@ export default abstract class AbstractSplitTypeWidget extends TypeWidget { this.#destroyResizer(); } - async doRefresh(note: FNote | null | undefined) { + async doRefresh(note: FNote) { this.#adjustLayoutOrientation(); - if (note && !this.isReadOnly) { + if (!this.isReadOnly) { await this.editorTypeWidget.initialized; this.editorTypeWidget.noteContext = this.noteContext; this.editorTypeWidget.spacedUpdate = this.spacedUpdate; diff --git a/src/public/app/widgets/type_widgets/abstract_svg_split_type_widget.ts b/src/public/app/widgets/type_widgets/abstract_svg_split_type_widget.ts index 061694349..24c2c1ae4 100644 --- a/src/public/app/widgets/type_widgets/abstract_svg_split_type_widget.ts +++ b/src/public/app/widgets/type_widgets/abstract_svg_split_type_widget.ts @@ -46,7 +46,7 @@ export default abstract class AbstractSvgSplitTypeWidget extends AbstractSplitTy $(window).on("resize", this.zoomHandler); } - async doRefresh(note: FNote | null | undefined) { + async doRefresh(note: FNote) { super.doRefresh(note); const blob = await note?.getBlob(); diff --git a/src/public/app/widgets/type_widgets/attachment_list.ts b/src/public/app/widgets/type_widgets/attachment_list.ts index cdb5161bc..aced1223c 100644 --- a/src/public/app/widgets/type_widgets/attachment_list.ts +++ b/src/public/app/widgets/type_widgets/attachment_list.ts @@ -45,9 +45,6 @@ export default class AttachmentListTypeWidget extends TypeWidget { } async doRefresh(note: Parameters[0]) { - // TriliumNextTODO: do we need to handle an undefined/null note? - if (!note) return false; - const $helpButton = $(`