diff --git a/src/components/Controls/DropDownButton/index.jsx b/src/components/Controls/DropDownButton/index.jsx index e5c572d..49ef692 100644 --- a/src/components/Controls/DropDownButton/index.jsx +++ b/src/components/Controls/DropDownButton/index.jsx @@ -18,7 +18,7 @@ const DropDownButton = ({ actions = [], payload = [], onClick = () => { } }) => const handleClick = () => { onClick() - actions[selectedIndex].trigger(...payload); + actions[selectedIndex] ? actions[selectedIndex].trigger(...payload) : actions[0].trigger(...payload) }; const handleMenuItemClick = (event, index) => { @@ -55,9 +55,9 @@ const DropDownButton = ({ actions = [], payload = [], onClick = () => { } }) => >