abmp-npm 2.0.18 → 2.0.19

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,6 +1,6 @@
1
1
  {
2
2
  "name": "abmp-npm",
3
- "version": "2.0.18",
3
+ "version": "2.0.19",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "check-cycles": "madge --circular .",
@@ -1686,7 +1686,13 @@ async function personalDetailsOnReady({
1686
1686
  option.isMain = false;
1687
1687
  });
1688
1688
 
1689
- const selectedOption = itemMemberObj.addressDisplayOption.find(opt => opt.key === selectedId);
1689
+ let selectedOption = itemMemberObj.addressDisplayOption.find(opt => opt.key === selectedId);
1690
+
1691
+ // If the option doesn't exist, create it
1692
+ if (!selectedOption) {
1693
+ selectedOption = { key: selectedId, isMain: false };
1694
+ itemMemberObj.addressDisplayOption.push(selectedOption);
1695
+ }
1690
1696
 
1691
1697
  selectedOption.isMain = true;
1692
1698
  }