Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ function TransactionGroupListItem<TItem extends ListItem>({
const onExpandIconPress = useCallback(() => {
if (isEmpty && !shouldDisplayEmptyView) {
onPress();
// onPress handles handleToggle() for us, so we return early to avoid calling it twice
return;
}
handleToggle();
}, [isEmpty, shouldDisplayEmptyView, handleToggle, onPress]);
Expand Down
Loading