Skip to content

Commit 7a76814

Browse files
authored
fix(richtext-lexical): localized sub-fields were omitted from the API output (#6489)
Closes #6455. Proper localization support will be worked on later, this just resolves the issue where having it enabled not only doesn't localize those fields, it also omits them from the API response. Now, they are not omitted, and localization is simply skipped.
1 parent 3839eb5 commit 7a76814

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/richtext-lexical/src/field/features/blocks/populationPromise.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const blockPopulationPromiseHOC = (
4040
fieldPromises,
4141
fields: block.fields,
4242
findMany,
43-
flattenLocales,
43+
flattenLocales: false, // Disable localization handling which does not work properly yet. Once we fully support hooks, this can be enabled (pass through flattenLocales again)
4444
overrideAccess,
4545
populationPromises,
4646
req,

packages/richtext-lexical/src/field/features/link/populationPromise.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const linkPopulationPromiseHOC = (
4040
fieldPromises,
4141
fields: props.fields,
4242
findMany,
43-
flattenLocales,
43+
flattenLocales: false, // Disable localization handling which does not work properly yet. Once we fully support hooks, this can be enabled (pass through flattenLocales again)
4444
overrideAccess,
4545
populationPromises,
4646
req,

packages/richtext-lexical/src/field/features/upload/populationPromise.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const uploadPopulationPromiseHOC = (
6464
fieldPromises,
6565
fields: props?.collections?.[node?.relationTo]?.fields,
6666
findMany,
67-
flattenLocales,
67+
flattenLocales: false, // Disable localization handling which does not work properly yet. Once we fully support hooks, this can be enabled (pass through flattenLocales again)
6868
overrideAccess,
6969
populationPromises,
7070
req,

0 commit comments

Comments
 (0)