@zeniai/client-epic-state 4.10.66 → 4.10.67

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.
@@ -243,7 +243,8 @@ const toTenantCoreDetailsView = (tenantsBaseView) => {
243
243
  };
244
244
  exports.toTenantCoreDetailsView = toTenantCoreDetailsView;
245
245
  const isTenantBankingOnly = (tenant) => {
246
- return tenant != null
246
+ // if the tenants API takes time, tenant can be non null with productSettings as null
247
+ return tenant != null && tenant.productSettings != null
247
248
  ? tenant.productSettings.isBankingEnabled === true &&
248
249
  tenant.productSettings.isBookkeepingEnabled === false &&
249
250
  tenant.productSettings.isSpendManagementEnabled === false
@@ -251,7 +252,8 @@ const isTenantBankingOnly = (tenant) => {
251
252
  };
252
253
  exports.isTenantBankingOnly = isTenantBankingOnly;
253
254
  const isTenantBookkeepingEnabled = (tenant) => {
254
- return tenant != null
255
+ // if the tenants API takes time, tenant can be non null with productSettings as null
256
+ return tenant != null && tenant.productSettings != null
255
257
  ? tenant.productSettings.isBookkeepingEnabled === true
256
258
  : true;
257
259
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.10.66",
3
+ "version": "4.10.67",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",