From cd2036f500ebdf9c7dc3ec34cc25870ad815702c Mon Sep 17 00:00:00 2001 From: Bartholomew Date: Fri, 26 Oct 2018 20:42:23 +0100 Subject: [PATCH] fix(widget-list): fix list item deletion (#1815) --- packages/netlify-cms-widget-list/src/ListControl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/netlify-cms-widget-list/src/ListControl.js b/packages/netlify-cms-widget-list/src/ListControl.js index 696e8384..60bcc224 100644 --- a/packages/netlify-cms-widget-list/src/ListControl.js +++ b/packages/netlify-cms-widget-list/src/ListControl.js @@ -181,7 +181,7 @@ export default class ListControl extends React.Component { const { itemsCollapsed } = this.state; const { value, metadata, onChange, field } = this.props; const collectionName = field.get('name'); - const isSingleField = this.valueType === valueTypes.SINGLE; + const isSingleField = this.getValueType() === valueTypes.SINGLE; const metadataRemovePath = isSingleField ? value.get(index) : value.get(index).valueSeq(); const parsedMetadata = metadata && { [collectionName]: metadata.removeIn(metadataRemovePath) };