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.
This commit is contained in:
Jarrod Flesch
2025-09-23 16:58:31 -04:00
committed by GitHub
parent 9c20eb34d4
commit 68882aa9bc

View File

@@ -33,7 +33,7 @@ export const syncDocAsSearchIndex = async ({
* this can happen when hooks call `payload.update` within the create lifecycle * this can happen when hooks call `payload.update` within the create lifecycle
* like the nested-docs plugin does * like the nested-docs plugin does
*/ */
return return doc
} else { } else {
syncedDocsSet.add(docKey) syncedDocsSet.add(docKey)
} }