mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-10-05 18:30:09 +02:00
fix: adjust return type of addDocuments in case of no additions (#353)
This commit is contained in:
parent
6e72519caf
commit
2914c09dd5
@ -36,7 +36,7 @@ const Document = {
|
|||||||
|
|
||||||
addDocuments: async function (workspace, additions = []) {
|
addDocuments: async function (workspace, additions = []) {
|
||||||
const VectorDb = getVectorDbClass();
|
const VectorDb = getVectorDbClass();
|
||||||
if (additions.length === 0) return;
|
if (additions.length === 0) return { failed: [], embedded: [] };
|
||||||
const embedded = [];
|
const embedded = [];
|
||||||
const failedToEmbed = [];
|
const failedToEmbed = [];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user