Skip to content

Commit

Permalink
Fix historical data request with no data in db (#259)
Browse files Browse the repository at this point in the history
Fixes #172
  • Loading branch information
maxslarsson authored Feb 7, 2025
2 parents 3421680 + b3ea900 commit a7e06fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ground-server/src/contexts/data-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ export function DataProvider({ children }: { children: ReactNode }) {
// Historical data
console.log("Historical Message Received");

if (message.data === null) {
console.log("No data received from historical message");
return;
}

setData((prevData) => {
const field = message.field;
const widgetData: DataPoint[] = message.data.map(
Expand Down

0 comments on commit a7e06fd

Please sign in to comment.