@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.
- package/package.json +1 -1
- package/utils/common.js +2 -2
package/package.json
CHANGED
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
|
|