Fix fields cannot be added on opportunity board if no field are present

This commit is contained in:
Charles Bochet 2024-03-11 00:09:34 +01:00
parent ec384cc791
commit 3f15cc5b7a

View File

@ -153,7 +153,7 @@ export const useRecordIndexOptionsForBoard = ({
...recordIndexFieldDefinitions,
{
...correspondingFieldDefinition,
position: lastVisibleBoardField.position + 1,
position: (lastVisibleBoardField?.position || 0) + 1,
isVisible: true,
},
];