Skip to content

Commit 4ab6ac0

Browse files
committed
fix: removed cancelled var
1 parent db53c16 commit 4ab6ac0

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

apps/web/src/hooks/useInstrumentVisualization.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ export function useInstrumentVisualization({ params }: UseInstrumentVisualizatio
6363
}
6464
});
6565

66-
67-
6866
const dl = (option: 'CSV' | 'CSV Long' | 'Excel' | 'Excel Long' | 'JSON' | 'TSV' | 'TSV Long') => {
6967
if (!instrument) {
7068
notifications.addNotification({ message: t('errors.noInstrumentSelected'), type: 'error' });
@@ -239,9 +237,7 @@ export function useInstrumentVisualization({ params }: UseInstrumentVisualizatio
239237
};
240238
});
241239

242-
if (!cancelled) {
243-
setRecords(records);
244-
}
240+
setRecords(records);
245241
}
246242
} catch (error) {
247243
console.error('Error occurred: ', error);
@@ -255,9 +251,6 @@ export function useInstrumentVisualization({ params }: UseInstrumentVisualizatio
255251
}
256252
};
257253
void fetchRecords();
258-
return () => {
259-
cancelled = true;
260-
};
261254
}, [recordsQuery.data]);
262255

263256
const instrumentOptions: { [key: string]: string } = useMemo(() => {

0 commit comments

Comments
 (0)