fix: undefined error when creating new row without subFieldState present (#5502)
This commit is contained in:
@@ -111,7 +111,7 @@ export function fieldReducer(state: FormState, action: FieldAction): FormState {
|
||||
const withNewRow = [...(state[path]?.rows || [])]
|
||||
|
||||
const newRow: Row = {
|
||||
id: (subFieldState?.id.value as string) || new ObjectId().toHexString(),
|
||||
id: (subFieldState?.id?.value as string) || new ObjectId().toHexString(),
|
||||
blockType: blockType || undefined,
|
||||
collapsed: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user