From 44b5a58d30bb31e575e861577cf779d25196cf5b Mon Sep 17 00:00:00 2001 From: braddf Date: Tue, 26 Nov 2024 15:33:05 +0000 Subject: [PATCH] fix type check on map source event --- apps/nowcasting-app/components/map/pvLatestMap.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/nowcasting-app/components/map/pvLatestMap.tsx b/apps/nowcasting-app/components/map/pvLatestMap.tsx index 78c9b601..7428e105 100644 --- a/apps/nowcasting-app/components/map/pvLatestMap.tsx +++ b/apps/nowcasting-app/components/map/pvLatestMap.tsx @@ -325,7 +325,7 @@ const PvLatestMap: React.FC = ({ }); map.on("data", (e) => { - if (e.sourceId === "latestPV" && e.isSourceLoaded) { + if (e.dataType === "source" && e.sourceId === "latestPV" && e.isSourceLoaded) { setMapDataLoading(false); } });