@nys-cui/cui-formpill 0.2.9 → 0.2.10

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
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "main": "./dist/js/cui-formpill.js",
8
8
  "type": "module",
9
- "version": "0.2.9",
9
+ "version": "0.2.10",
10
10
  "scripts": {
11
11
  "clean": "rm -rf ./dist",
12
12
  "build": "npm run clean && cui --dep",
@@ -1333,7 +1333,8 @@ class CUI_FORMPILL extends HTMLElement {
1333
1333
 
1334
1334
  // Loop through each value in pill.values
1335
1335
  for (const val of pill.values) {
1336
- const option = foundItem.controls.value.options.find(opt => opt.value === val);
1336
+ const optionProperty = foundItem.controls.value.options ?? foundItem.controls.value.control ?? null;
1337
+ const option = optionProperty ? optionProperty.find(opt => opt.value === val) : null;
1337
1338
  if (option) {
1338
1339
  labelsArray.push(option.label);
1339
1340
  } else {