@capillarytech/creatives-library 7.17.137 → 7.17.138

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.17.137",
4
+ "version": "7.17.138",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -103,9 +103,8 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
103
103
  }
104
104
  onTemplateNameChange = ({target: {value}}) => {
105
105
  const {onEnterTemplateName, onRemoveTemplateName} = this.props;
106
- this.setState({ templateName: value });
107
- const isEmptyTemplateName = value?.trim()?.length === 0;
108
- this.setState({isTemplateNameEmpty: isEmptyTemplateName});
106
+ const isEmptyTemplateName = !value?.trim();
107
+ this.setState({templateName: value, isTemplateNameEmpty: isEmptyTemplateName});
109
108
  if (value && onEnterTemplateName) {
110
109
  onEnterTemplateName();
111
110
  } else if (onRemoveTemplateName) {