haya-select 1.0.9 → 1.0.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "haya-select",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -399,14 +399,14 @@ export default class HayaSelect extends React.PureComponent {
399
399
  }
400
400
 
401
401
  presentOption = (currentValue) => {
402
- const {toggleOptions} = this.props
402
+ const {toggleOptions} = this.props || {}
403
403
  const {toggled} = digs(this.state, "toggled")
404
404
 
405
405
  return (
406
406
  <div
407
407
  className="haya-select-option-presentation"
408
- data-toggle-icon={toggleOptions[toggled[currentValue.value]]?.icon}
409
- data-toggle-value={toggleOptions[toggled[currentValue.value]]?.value}
408
+ data-toggle-icon={toggleOptions && toggled && toggleOptions[toggled[currentValue.value]]?.icon}
409
+ data-toggle-value={toggleOptions && toggled && toggleOptions[toggled[currentValue.value]]?.value}
410
410
  data-value={currentValue.value}
411
411
  >
412
412
  {toggleOptions && !(currentValue.value in toggled) &&