diff --git a/src/pages/app/Document.svelte b/src/pages/app/Document.svelte index b3ec615ac..20b5e70f6 100644 --- a/src/pages/app/Document.svelte +++ b/src/pages/app/Document.svelte @@ -88,10 +88,10 @@ progress={$documents.realProgressMap[document.id]} processed={$documents.pagesProcessedMap[document.id]} pageCount={$documents.pageCountMap[document.id]} - noteCount={document.notes.length} - publicNote={document.notes.some((x) => x.access === "public")} - orgNote={document.notes.some((x) => x.access === "organization")} - privateNote={document.notes.some((x) => x.access === "private")} + noteCount={document.notes?.length} + publicNote={document.notes?.some((x) => x.access === "public")} + orgNote={document.notes?.some((x) => x.access === "organization")} + privateNote={document.notes?.some((x) => x.access === "private")} on:pick /> diff --git a/src/structure/searchParams.js b/src/structure/searchParams.js index 2d019d1c7..d066412c8 100644 --- a/src/structure/searchParams.js +++ b/src/structure/searchParams.js @@ -4,6 +4,7 @@ import { DEFAULT_ORDERING } from "@/api/common.js"; import { getProjectDocuments } from "@/api/project.ts"; import { cacheAsync } from "@/util/cache.js"; import { highlight } from "@/search/parse.js"; +import { Results } from "./results.js"; const searchDocumentsCached = cacheAsync(searchDocuments);