File tree Expand file tree Collapse file tree 2 files changed +1
-7
lines changed
richtext-lexical/src/features/blocks/client/component
ui/src/providers/DocumentInfo Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,6 @@ export const BlockComponent: React.FC<Props> = (props) => {
57
57
// Field Schema
58
58
useEffect ( ( ) => {
59
59
const awaitInitialState = async ( ) => {
60
- if ( ! id ) {
61
- return
62
- }
63
60
const { state } = await getFormState ( {
64
61
apiRoute : config . routes . api ,
65
62
body : {
@@ -90,9 +87,6 @@ export const BlockComponent: React.FC<Props> = (props) => {
90
87
91
88
const onChange = useCallback (
92
89
async ( { formState : prevFormState } ) => {
93
- if ( ! id ) {
94
- throw new Error ( 'No ID found' )
95
- }
96
90
const { state : formState } = await getFormState ( {
97
91
apiRoute : config . routes . api ,
98
92
body : {
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export type DocumentInfoProps = {
31
31
readonly globalSlug ?: SanitizedGlobalConfig [ 'slug' ]
32
32
readonly hasPublishPermission ?: boolean
33
33
readonly hasSavePermission ?: boolean
34
- readonly id : null | number | string
34
+ readonly id ?: number | string
35
35
readonly initialData ?: Data
36
36
readonly initialState ?: FormState
37
37
readonly isEditing ?: boolean
You can’t perform that action at this time.
0 commit comments