Skip to content

Commit f279d1e

Browse files
committed
Fixing existing candidates check for retrieval
1 parent af4bf26 commit f279d1e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/map-projects/MapProject.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,9 +2059,9 @@ const MapProject = () => {
20592059
return
20602060
let __row = isEmpty(_row) ? row : _row
20612061

2062-
const existingCandidates = find(allCandidates[algoId], c => c.row.__index === __row.__index)
2062+
const existingCandidates = find(allCandidatesRef.current[algoId], c => c.row.__index === __row.__index)
20632063

2064-
if(!forceReload && offset === 0 && !_retired && (existingCandidates?.length > 0 || !isEmpty(existingCandidates?.row))) {
2064+
if(!forceReload && offset === 0 && !_retired && existingCandidates?.results?.length > 0) {
20652065
markAlgo(__row.__index, algoId, 1)
20662066
setTimeout(() => highlightTexts((existingCandidates?.results || []), null, false), 100)
20672067
const nextAlgo = getNextAlgoDef(algoId)

0 commit comments

Comments
 (0)