Skip to content

Commit 6f82154

Browse files
authored
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
1 parent a10c3a5 commit 6f82154

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/richtext-lexical/src/features/textState/feature.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const TextStateFeature = createServerFeature<
6969
return {
7070
ClientFeature: '@payloadcms/richtext-lexical/client#TextStateFeatureClient',
7171
clientFeatureProps: {
72-
state: props.state,
72+
state: props?.state,
7373
},
7474
}
7575
},

0 commit comments

Comments
 (0)