fix(richtext-lexical): prevent runtime error if using TextStateFeature without props (#12668)

TextStateFeature wasn't intended to be used without props, but it still
shouldn't throw a runtime error if used that way. Perhaps some users are
experimenting until they decide on the props.

Fixes #12518
This commit is contained in:
Germán Jabloñski
2025-06-05 11:12:00 -03:00
committed by GitHub
parent a10c3a5ba3
commit 6f82154ce4

View File

@@ -69,7 +69,7 @@ export const TextStateFeature = createServerFeature<
return { return {
ClientFeature: '@payloadcms/richtext-lexical/client#TextStateFeatureClient', ClientFeature: '@payloadcms/richtext-lexical/client#TextStateFeatureClient',
clientFeatureProps: { clientFeatureProps: {
state: props.state, state: props?.state,
}, },
} }
}, },