Skip to content

Commit

Permalink
fix: conditional for lastNotNull
Browse files Browse the repository at this point in the history
  • Loading branch information
insmac committed Nov 29, 2024
1 parent 73d2b47 commit c7e623d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/web-console/src/scenes/Editor/Metrics/metric.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ export const Metric = ({
}
if (responses[1] && responses[1].type === QuestDB.Type.DQL) {
const lastNotNull = responses[1].data[0] as LastNotNull
setLastNotNull(new Date(lastNotNull.created).getTime())
if (lastNotNull) {
setLastNotNull(new Date(lastNotNull.created).getTime())
}
}
} catch (err) {
console.error(err)
Expand Down

0 comments on commit c7e623d

Please sign in to comment.