openchs-models 1.30.46 → 1.30.47

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/dist/Individual.js +7 -10
  2. package/package.json +1 -1
@@ -806,19 +806,16 @@ class Individual extends _BaseEntity.default {
806
806
  }
807
807
 
808
808
  subjectAddressText(i18n) {
809
- const parentAddress = _lodash.default.get(this, 'lowestAddressLevel.locationMappings[0].parent.name');
809
+ if (!_lodash.default.isNil(this.lowestAddressLevel)) {
810
+ let addressText = i18n.t(this.lowestAddressLevel.name);
810
811
 
811
- let addressText = i18n.t(this.lowestAddressLevel.name);
812
- if (!_lodash.default.isNil(parentAddress)) addressText += ', ' + i18n.t(parentAddress);
813
- return addressText;
814
- }
812
+ const parentAddress = _lodash.default.get(this, 'lowestAddressLevel.locationMappings[0].parent.name');
815
813
 
816
- subjectAddressText(i18n) {
817
- const parentAddress = _lodash.default.get(this, 'lowestAddressLevel.locationMappings[0].parent.name');
814
+ if (!_lodash.default.isNil(parentAddress)) addressText += ', ' + i18n.t(parentAddress);
815
+ return addressText;
816
+ }
818
817
 
819
- let addressText = i18n.t(this.lowestAddressLevel.name);
820
- if (!_lodash.default.isNil(parentAddress)) addressText += ', ' + i18n.t(parentAddress);
821
- return addressText;
818
+ return '';
822
819
  } //TODO these methods are slightly differece because of differece in UI on search result and my dashboard listing. Not taking the hit right now.
823
820
 
824
821
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "openchs-models",
3
3
  "description": "OpenCHS data model to be used by front end clients",
4
- "version": "1.30.46",
4
+ "version": "1.30.47",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",