Skip to content

Commit

Permalink
another import
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Mar 12, 2024
1 parent 38a690a commit 8a65672
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/pages/app/stories/DocumentThumbnail.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
processed: null,
pageCount: null,
};
const errorDoc = new Document({ ...document, status: null });
</script>

<Template let:args>
Expand Down Expand Up @@ -57,3 +59,5 @@
progress: 0.5,
}}
/>

<Story name="error" args={{ ...args, document: errorDoc }} />
5 changes: 2 additions & 3 deletions src/structure/searchParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getProjectDocuments } from "@/api/project.ts";
import { cacheAsync } from "@/util/cache.js";
import { highlight } from "@/search/parse.js";
import { Results } from "./results.js";
import { Document } from "./document.js";

const searchDocumentsCached = cacheAsync(searchDocuments);

Expand Down Expand Up @@ -260,9 +261,7 @@ export class SearchParams extends Svue {
);
return new Results(url, {
...data,
results: data.results.map(
(document) => new Document(document),
),
results: data.results.map((d) => new Document(d.document)),
});
},
null,
Expand Down

0 comments on commit 8a65672

Please sign in to comment.