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:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user