@shushed/helpers 0.0.219 → 0.0.220

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.
@@ -224,7 +224,7 @@ class CentraHelper extends env_1.default {
224
224
  return result;
225
225
  }
226
226
  async fetchCentraCampaigns(names) {
227
- const limit = (names?.length || 0) > 200 ? 200 : (names?.length || 0);
227
+ const limit = names ? (names.length > 200 ? 200 : names.length) : 200;
228
228
  let nextCursor = null;
229
229
  const result = {};
230
230
  do {
@@ -810,7 +810,7 @@ class CentraHelper extends env_1.default {
810
810
  let dedupedCampaignNamesInCache = [];
811
811
  let campaignsToFetch = null;
812
812
  if (!alwaysFetch) {
813
- const campaignNamesInCache = (await this.get(this.getCacheKeyForCampaigns(), 'env', {
813
+ const campaignNamesInCache = await (this.get(this.getCacheKeyForCampaigns(), 'env', {
814
814
  isEphemeral: true,
815
815
  encrypted: false,
816
816
  }).then(x => x ? JSON.parse(x) : null));
@@ -820,7 +820,7 @@ class CentraHelper extends env_1.default {
820
820
  isEphemeral: true,
821
821
  encrypted: false,
822
822
  })).map(([key, value]) => [key, value ? JSON.parse(value || 'null') : undefined]).filter(([_, value]) => value));
823
- campaignsToFetch = Object.keys(campaignInCache).filter(x => !dedupedCampaignNamesInCache.includes(x));
823
+ campaignsToFetch = dedupedCampaignNamesInCache.filter(x => !campaignInCache[x]);
824
824
  }
825
825
  }
826
826
  const campaignToSet = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shushed/helpers",
3
- "version": "0.0.219",
3
+ "version": "0.0.220",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",