mirror of https://github.com/FlowiseAI/Flowise.git
Merge pull request #1127 from chz8494/memory_replace_fix
[Bug] Fix Cannot read properties of undefined (reading 'replace')pull/1158/head
commit
06552416bb
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue