Skip to content

Commit 97f3178

Browse files
committed
fix: ensures overrideAccess is false if undefined while populating
1 parent 73f418b commit 97f3178

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/fields/relationshipPopulationPromise.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const populate = async ({
4747
collection: relatedCollection.config.slug,
4848
id: idString as string,
4949
currentDepth: currentDepth + 1,
50-
overrideAccess,
50+
overrideAccess: typeof overrideAccess === 'undefined' ? false : overrideAccess,
5151
disableErrors: true,
5252
depth,
5353
showHiddenFields,

src/fields/richText/populate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const populate = async ({
3939
collection: collection.config.slug,
4040
id,
4141
currentDepth: currentDepth + 1,
42-
overrideAccess,
42+
overrideAccess: typeof overrideAccess === 'undefined' ? false : overrideAccess,
4343
disableErrors: true,
4444
depth,
4545
showHiddenFields,

0 commit comments

Comments
 (0)