fix: disable all documents by default

This commit is contained in:
Timothy J. Baek 2024-02-03 17:26:57 -08:00
parent eb2b1ab77b
commit f814b08bcc

View file

@ -17,12 +17,16 @@
let collections = [];
$: collections = [
...($documents.length > 0
? [
{
name: 'All Documents',
type: 'collection',
title: 'All Documents',
collection_names: $documents.map((doc) => doc.collection_name)
},
}
]
: []),
...$documents
.reduce((a, e, i, arr) => {
return [...new Set([...a, ...(e?.content?.tags ?? []).map((tag) => tag.name)])];