From 6136d58eba0ca92fe241e005824ca05eebb00f7d Mon Sep 17 00:00:00 2001 From: abrook Date: Fri, 20 Dec 2024 10:18:22 -0500 Subject: [PATCH] fix missing return --- js/ai/src/retriever.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/js/ai/src/retriever.ts b/js/ai/src/retriever.ts index 1a116055e..c67c9eee7 100644 --- a/js/ai/src/retriever.ts +++ b/js/ai/src/retriever.ts @@ -370,6 +370,7 @@ function itemToMetadata( if (Array.isArray(options.metadata) && typeof item === 'object') { const out: Record = {}; options.metadata.forEach((key) => (out[key] = item[key])); + return out; } if (typeof options.metadata === 'function') return options.metadata(item); if (!options.metadata && typeof item === 'object') {