haya-select 1.0.33 → 1.0.34
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 +1 -1
- package/src/select/index.jsx +4 -0
package/package.json
CHANGED
package/src/select/index.jsx
CHANGED
|
@@ -557,6 +557,10 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
|
|
|
557
557
|
const toggledValue = toggled[option.value]
|
|
558
558
|
const toggledOption = toggleOptions.find((element) => element.value == toggledValue)
|
|
559
559
|
|
|
560
|
+
if (!toggledOption) {
|
|
561
|
+
throw new Error(`Couldn't find a toggle option for value: ${toggledValue}`)
|
|
562
|
+
}
|
|
563
|
+
|
|
560
564
|
return toggledOption.icon
|
|
561
565
|
}
|
|
562
566
|
}
|