@capillarytech/creatives-library 7.4.3 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/common.js +2 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.4.3",
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