Skip to content

Commit

Permalink
Merge pull request #43192 from Expensify/cmartins-fixCrashIfReportDoe…
Browse files Browse the repository at this point in the history
…sntHaveTransactions

Fix crash if report doesnt have transactions
  • Loading branch information
Beamanator authored Jun 6, 2024
2 parents c2d427d + a45dab2 commit eddb696
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/SelectionList/Search/ReportListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ function ReportListItem<TItem extends ListItem>({
const {isLargeScreenWidth} = useWindowDimensions();
const StyleUtils = useStyleUtils();

if (reportItem.transactions.length === 0) {
return;
}

const listItemPressableStyle = [styles.selectionListPressableItemWrapper, styles.pv3, item.isSelected && styles.activeComponentBG, isFocused && styles.sidebarLinkActive];

const handleOnButtonPress = () => {
Expand Down

0 comments on commit eddb696

Please sign in to comment.