more robust backfilling of current weather properties close #177

This commit is contained in:
Matt Walsh
2026-02-16 20:40:13 -06:00
parent 37193112a7
commit 69d2b0f40b

View File

@@ -324,7 +324,7 @@ const backfill = (data) => {
// backfill each property
Object.keys(sortedData[0].properties).forEach((key) => {
// qualify the key (must have value)
if (Object.hasOwn(sortedData[0].properties[key], 'value')) {
if (Object.hasOwn(sortedData[0].properties?.[key] ?? {}, 'value')) {
// backfill this property
result[key] = backfillProperty(sortedData, key);
} else {