@capillarytech/creatives-library 7.4.2 → 7.4.4

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.4.2",
4
+ "version": "7.4.4",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
package/utils/common.js CHANGED
@@ -100,7 +100,7 @@ export function getTreeStructuredTags({tagsList, userLocale = 'en', offerDetails
100
100
  return getTreeStructureData(combinedTags);
101
101
  }
102
102
 
103
- function transformCouponTags(offerDetails, allTags) {
103
+ function transformCouponTags(offerDetails, allTags = []) {
104
104
  const couponTags = {};
105
105
  const couponTagsKeys = Object.keys(_.get(allTags, 'coupon.subtags', []));
106
106
  const withCouponId = (obj, id) => {
@@ -151,7 +151,7 @@ function transformCouponTags(offerDetails, allTags) {
151
151
  };
152
152
  });
153
153
  // eslint-disable-next-line no-param-reassign
154
- allTags.coupon.subtags = couponTags;
154
+ (allTags.coupon || {}).subtags = couponTags;
155
155
  return allTags;
156
156
  }
157
157
 
@@ -319,7 +319,7 @@ export class FTP extends React.Component {
319
319
  dropdownClassName="select-csv-col-dropdown"
320
320
  treeData={tagsWithoutOptout}
321
321
  className="select-csv-column"
322
- value={item.header}
322
+ value={!isEmpty(item.header) ? item.header : formatMessage(messages.selectTag)}
323
323
  onChange={(option, label) => this.selectCsvColumn(option, label, index)}
324
324
  showSearch
325
325
  searchPlaceholder={