Skip to content

Commit cb4ea74

Browse files
author
Jannik Weise
committed
🐛 Fix missing return value in list item head
1 parent a968ffd commit cb4ea74

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/components/list/list-item/list-item-head/ListItemHead.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ const ListItemHead: FC<ListItemHeadProps> = ({
171171
const shouldPreventRightElementClick = useMemo(() => {
172172
if (!rightElements) return false;
173173

174-
// Check if right elements is an object or of type ReactNode
175174
if (
176175
typeof rightElements === 'object' &&
177176
('bottom' in rightElements || 'center' in rightElements || 'top' in rightElements)
@@ -190,6 +189,8 @@ const ListItemHead: FC<ListItemHeadProps> = ({
190189
} else {
191190
return getElementClickEvent(rightElements as ReactNode);
192191
}
192+
193+
return false;
193194
}, [rightElements]);
194195

195196
const iconOrImageElement = useMemo(() => {

0 commit comments

Comments
 (0)