Skip to content

Commit cc3c881

Browse files
committed
should validate .pageContent
1 parent 4735d74 commit cc3c881

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/components/nodes/vectorstores/InMemory/InMemoryVectorStore.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class InMemoryVectorStore_VectorStores implements INode {
7171
const flattenDocs = docs && docs.length ? flatten(docs) : []
7272
const finalDocs = []
7373
for (let i = 0; i < flattenDocs.length; i += 1) {
74-
if (flattenDocs[i] !== undefined) {
74+
if (flattenDocs[i] !== undefined && flattenDocs[i].pageContent !== undefined) {
7575
finalDocs.push(new Document(flattenDocs[i]))
7676
}
7777
}

0 commit comments

Comments
 (0)