From 68882aa9bc99ad2a2ce3e20baa4e5ad4a4d6166d Mon Sep 17 00:00:00 2001 From: Jarrod Flesch <30633324+JarrodMFlesch@users.noreply.github.com> Date: Tue, 23 Sep 2025 16:58:31 -0400 Subject: [PATCH] fix(plugin-search): returns doc instead of empty return (#13916) Returns doc instead of nothing/undefined inside the syncDocAsSearchIndex function when the plugin encounters a document it has already synced. --- packages/plugin-search/src/utilities/syncDocAsSearchIndex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-search/src/utilities/syncDocAsSearchIndex.ts b/packages/plugin-search/src/utilities/syncDocAsSearchIndex.ts index 2b2372963..7755f44a5 100644 --- a/packages/plugin-search/src/utilities/syncDocAsSearchIndex.ts +++ b/packages/plugin-search/src/utilities/syncDocAsSearchIndex.ts @@ -33,7 +33,7 @@ export const syncDocAsSearchIndex = async ({ * this can happen when hooks call `payload.update` within the create lifecycle * like the nested-docs plugin does */ - return + return doc } else { syncedDocsSet.add(docKey) }