We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4e18fe3 + 8c2f606 commit 29e2d69Copy full SHA for 29e2d69
src/components/GardenPlanner.vue
@@ -285,7 +285,9 @@ const summaryData = computed(() => {
285
familyMap.set(plantFamily, { plants: new Map() });
286
}
287
288
- const family = familyMap.get(plantFamily)!;
+ const family = familyMap.get(plantFamily);
289
+ if (!family) continue;
290
+
291
if (!family.plants.has(placed.plantId)) {
292
family.plants.set(placed.plantId, {
293
plantId: placed.plantId,
@@ -296,7 +298,9 @@ const summaryData = computed(() => {
296
298
});
297
299
300
- const plantEntry = family.plants.get(placed.plantId)!;
301
+ const plantEntry = family.plants.get(placed.plantId);
302
+ if (!plantEntry) continue;
303
304
plantEntry.count++;
305
plantEntry.coordinates.push(centerCoord);
306
0 commit comments