@capillarytech/creatives-library 7.17.96 → 7.17.97-alpha.0

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.96",
4
+ "version": "7.17.97-alpha.0",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -929,7 +929,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
929
929
  }
930
930
  // Check if template subject present in form data from Loyalty, DVS, Timeline
931
931
  if (index === 'template-subject' && type.toLowerCase() === 'embedded' && (currentModule.toLowerCase() === 'loyalty' || currentModule.toLowerCase() === 'dvs' || currentModule.toLowerCase() === 'timeline' || currentModule.toLowerCase() === 'library')) {
932
- if (data && data.trim() === '') {
932
+ if ((data && data.trim() === '') || !data) {
933
933
  errorData[index] = true;
934
934
  isValid = false;
935
935
  } else {
@@ -2069,7 +2069,13 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2069
2069
  formData[0].selectedLanguages = [];
2070
2070
  let tabKey;
2071
2071
  if ((this.props.location.query.isLanguageSupport === undefined || this.props.location.query.isLanguageSupport === 'false')) {
2072
- formData['template-subject'] = data.base.subject ? data.base.subject : '';
2072
+ const templateSubject = formData?.['template-subject'];
2073
+ const baseSubject = data?.base?.subject;
2074
+ if (templateSubject === '') {
2075
+ formData['template-subject'] = '';
2076
+ } else if (!templateSubject && baseSubject) {
2077
+ formData['template-subject'] = baseSubject;
2078
+ }
2073
2079
  const baseLanguage = this.props.currentOrgDetails.basic_details.base_language;
2074
2080
  let languageIndex = _.findIndex(this.supportedLanguages, {iso_code: baseLanguage});
2075
2081