Skip to content

Commit

Permalink
null check on fileData;
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 committed Aug 7, 2024
1 parent 3a36f62 commit 7ffab1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/organisms/Devices/HistoricalProtocolRunDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ interface CsvFileDataRowProps {
function CsvFileDataRow(props: CsvFileDataRowProps): JSX.Element | null {
const { fileId } = props

const { data: fileData, isSuccess } = useCsvFileQuery(fileId)
if (!isSuccess) {
const { data: fileData } = useCsvFileQuery(fileId)
if (fileData == null) {
return null
}
const { name, createdAt } = fileData.data
Expand Down

0 comments on commit 7ffab1a

Please sign in to comment.