fix: remove empty list item (#3245)
This commit is contained in:
parent
2447f9c311
commit
f915bf375f
@ -273,7 +273,10 @@ export default class ListControl extends React.Component {
|
||||
const isSingleField = this.getValueType() === valueTypes.SINGLE;
|
||||
|
||||
const metadataRemovePath = isSingleField ? value.get(index) : value.get(index).valueSeq();
|
||||
const parsedMetadata = metadata && { [collectionName]: metadata.removeIn(metadataRemovePath) };
|
||||
const parsedMetadata =
|
||||
metadata && !metadata.isEmpty()
|
||||
? { [collectionName]: metadata.removeIn(metadataRemovePath) }
|
||||
: metadata;
|
||||
|
||||
// Removed item object index is the last item in the list
|
||||
const removedItemIndex = value.count() - 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user