mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 09:00:52 +03:00
add fix when docs are empty
This commit is contained in:
@@ -55,7 +55,7 @@ class InMemoryVectorStore_VectorStores implements INode {
|
||||
const embeddings = nodeData.inputs?.embeddings as Embeddings
|
||||
const output = nodeData.outputs?.output as string
|
||||
|
||||
const flattenDocs = docs.flat()
|
||||
const flattenDocs = docs && docs.length ? docs.flat() : []
|
||||
const finalDocs = []
|
||||
for (let i = 0; i < flattenDocs.length; i += 1) {
|
||||
finalDocs.push(new Document(flattenDocs[i]))
|
||||
|
||||
Reference in New Issue
Block a user