Skip to content

Commit 283f1a4

Browse files
author
Nabi Ebrahimi
committed
Fix crash when selecting a group on the search page
1 parent 1e83f0b commit 283f1a4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/components/Search/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {findFocusedRoute, useFocusEffect, useIsFocused, useNavigation} from '@react-navigation/native';
22
import * as Sentry from '@sentry/react-native';
3+
import {deepEqual} from 'fast-equals';
34
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
45
import type {NativeScrollEvent, NativeSyntheticEvent, StyleProp, ViewStyle} from 'react-native';
56
import {View} from 'react-native';
@@ -957,6 +958,10 @@ function Search({
957958
return;
958959
}
959960

961+
if (deepEqual(newTransactionList, selectedTransactions)) {
962+
return;
963+
}
964+
960965
setSelectedTransactions(newTransactionList, filteredData);
961966

962967
isRefreshingSelection.current = true;

0 commit comments

Comments
 (0)