Handle unknown fields

This commit is contained in:
Maciej Ziarkowski 2019-11-14 16:08:25 +00:00
parent 5e3ce365d5
commit c84ed10af5

View File

@ -30,7 +30,7 @@ function enrichHistoryEntries(forwardPatch: object, reversePatch: object) {
return Object return Object
.entries(forwardPatch) .entries(forwardPatch)
.map(([key, value]) => { .map(([key, value]) => {
const info = dataFields[key] as DataFieldDefinition; const info = dataFields[key] || {} as DataFieldDefinition;
return { return {
title: info.title || `Unknown field (${key})`, title: info.title || `Unknown field (${key})`,
category: info.category || Category.Unknown, category: info.category || Category.Unknown,