@capillarytech/creatives-library 7.13.19 → 7.13.20

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.
@@ -455,9 +455,10 @@ export class MapTemplates extends React.Component { // eslint-disable-line react
455
455
  getFormData(e) {
456
456
 
457
457
  const selectedWeChatAccount = (!_.isEmpty(this.props.Templates.selectedWeChatAccount) ? this.props.Templates.selectedWeChatAccount : this.props.WeChat.selectedWeChatAccount);
458
+ const base = this.state?.editTemplateData?.versions?.base;
458
459
  const data = {
459
- template_id: this.state.editTemplateData.versions.base.template_id,
460
- Title: this.state.editTemplateData.versions.base.Title,
460
+ template_id: _.get(base, 'template_id'),
461
+ Title: _.get(base, 'Title'),
461
462
  Tag: [],
462
463
  TopColor: "#000000",
463
464
  data: {},
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.13.19",
4
+ "version": "7.13.20",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -217,7 +217,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
217
217
  this.setState({tabKey});
218
218
  }
219
219
  this.setState({formData: nextProps.formData, currentLangTab}, () => {
220
- if (nextProps.isNewVersionFlow && !this.state.formData[this.state.currentTab - 1][this.state.formData[this.state.currentTab - 1].activeTab].tabKey) {
220
+ if (nextProps.isNewVersionFlow && !this.state.formData[this.state.currentTab - 1][this.state.formData[this.state.currentTab - 1].activeTab]?.tabKey) {
221
221
  this.resetTabKeys(nextProps.formData, nextProps.tabCount, false, true);
222
222
  }
223
223
  if (type === 'embedded' || ( this.props.schema.channel && this.props.schema.channel.toUpperCase() === 'EMAIL')) {