chore(client): fix typecheck

This commit is contained in:
Elian Doran 2026-03-03 19:41:51 +02:00
parent 366a8e8726
commit 0d6e2fc00f
No known key found for this signature in database

View File

@ -1,4 +1,5 @@
import { NoteType } from "@triliumnext/commons";
import FNote from "../entities/fnote";
import { ViewTypeOptions } from "../widgets/collections/interface";
@ -17,7 +18,8 @@ export const byNoteType: Record<Exclude<NoteType, "book">, string | null> = {
render: null,
search: null,
text: null,
webView: null
webView: null,
spreadsheet: null
};
export const byBookType: Record<ViewTypeOptions, string | null> = {
@ -38,6 +40,6 @@ export function getHelpUrlForNote(note: FNote | null | undefined) {
} else if (note?.hasLabel("textSnippet")) {
return "pwc194wlRzcH";
} else if (note && note.type === "book") {
return byBookType[note.getAttributeValue("label", "viewType") as ViewTypeOptions ?? ""]
return byBookType[note.getAttributeValue("label", "viewType") as ViewTypeOptions ?? ""];
}
}