fix: #1887, dataloader rich text population infinite loop
This commit is contained in:
@@ -31,16 +31,16 @@ export const populate = async ({
|
||||
}): Promise<void> => {
|
||||
const dataRef = data as Record<string, unknown>;
|
||||
|
||||
const doc = await req.payload.findByID({
|
||||
req,
|
||||
collection: collection.config.slug,
|
||||
const doc = await req.payloadDataLoader.load(JSON.stringify([
|
||||
collection.config.slug,
|
||||
id,
|
||||
currentDepth: currentDepth + 1,
|
||||
overrideAccess: typeof overrideAccess === 'undefined' ? false : overrideAccess,
|
||||
disableErrors: true,
|
||||
depth,
|
||||
currentDepth + 1,
|
||||
req.locale,
|
||||
req.fallbackLocale,
|
||||
typeof overrideAccess === 'undefined' ? false : overrideAccess,
|
||||
showHiddenFields,
|
||||
});
|
||||
]));
|
||||
|
||||
if (doc) {
|
||||
dataRef[key] = doc;
|
||||
|
||||
Reference in New Issue
Block a user