mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 13:01:11 +03:00
Merge pull request #1127 from chz8494/memory_replace_fix
[Bug] Fix Cannot read properties of undefined (reading 'replace')
This commit is contained in:
@@ -71,7 +71,9 @@ class InMemoryVectorStore_VectorStores implements INode {
|
||||
const flattenDocs = docs && docs.length ? flatten(docs) : []
|
||||
const finalDocs = []
|
||||
for (let i = 0; i < flattenDocs.length; i += 1) {
|
||||
finalDocs.push(new Document(flattenDocs[i]))
|
||||
if (flattenDocs[i] !== undefined && flattenDocs[i].pageContent !== undefined) {
|
||||
finalDocs.push(new Document(flattenDocs[i]))
|
||||
}
|
||||
}
|
||||
|
||||
const vectorStore = await MemoryVectorStore.fromDocuments(finalDocs, embeddings)
|
||||
|
||||
Reference in New Issue
Block a user