From c84ed10af59bedf22423b9c8b712b1b4a973ad4a Mon Sep 17 00:00:00 2001 From: Maciej Ziarkowski Date: Thu, 14 Nov 2019 16:08:25 +0000 Subject: [PATCH] Handle unknown fields --- .../frontend/building/edit-history/building-edit-summary.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/building/edit-history/building-edit-summary.tsx b/app/src/frontend/building/edit-history/building-edit-summary.tsx index 909bb8bd..2ac230cd 100644 --- a/app/src/frontend/building/edit-history/building-edit-summary.tsx +++ b/app/src/frontend/building/edit-history/building-edit-summary.tsx @@ -30,7 +30,7 @@ function enrichHistoryEntries(forwardPatch: object, reversePatch: object) { return Object .entries(forwardPatch) .map(([key, value]) => { - const info = dataFields[key] as DataFieldDefinition; + const info = dataFields[key] || {} as DataFieldDefinition; return { title: info.title || `Unknown field (${key})`, category: info.category || Category.Unknown,