Update utils.ts to fix backend bug that prevented library items from loading

This commit is contained in:
CobriMediaJulien
2024-12-15 15:56:10 +01:00
committed by GitHub
parent 3ed9f4e056
commit e64e51c078

View File

@@ -160,7 +160,7 @@ const STRING_MIME_TYPES = [
"image/svg+xml"
];
function isStringNote(type: string | null, mime: string) {
function isStringNote(type: string | undefined, mime: string) {
// render and book are string note in the sense that they are expected to contain empty string
return (type && ["text", "code", "relationMap", "search", "render", "book", "mermaid", "canvas"].includes(type))
|| mime.startsWith('text/')