@capillarytech/creatives-library 7.12.116 → 7.12.118

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.12.116",
4
+ "version": "7.12.118",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -149,7 +149,7 @@ export const getCdnUrl = ({
149
149
  let CREATIVES_S3_BUCKET_PATH = getLocalStorageItem(CREATIVES_S3_BUCKET_PATH_KEY);
150
150
 
151
151
  //remove all leading and trailing forward slash with empty string, if leading/trailing forward slash is present in node env by mistake then url will not be correct hence removing them.
152
- CREATIVES_S3_BUCKET_PATH = CREATIVES_S3_BUCKET_PATH.replace(/^\/|\/$/g, '');
152
+ CREATIVES_S3_BUCKET_PATH = CREATIVES_S3_BUCKET_PATH?.replace(/^\/|\/$/g, '');
153
153
 
154
154
  //Basic validations on data stored in local storage.
155
155
  if (
@@ -93,6 +93,8 @@ function* getCdnTransformationConfig() {
93
93
  if (res?.success && res?.status?.code === 200) {
94
94
  const cdnConfigs = res?.response;
95
95
  saveCdnConfigs(cdnConfigs);
96
+ } else {
97
+ removeAllCdnLocalStorageItems();
96
98
  }
97
99
  } catch (error) {
98
100
  console.log("some error occured during getCdnTransformationConfig call");