mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-22 15:39:11 +00:00
prevent rare case of old customFields (#1163)
as part of subscriptions in operator
This commit is contained in:
committed by
GitHub
parent
ce8b0d9850
commit
dffccd258f
@@ -170,9 +170,12 @@ export default function Operator() {
|
|||||||
const mainField = main ? getPropertyValue(entry, main) ?? '' : entry.title;
|
const mainField = main ? getPropertyValue(entry, main) ?? '' : entry.title;
|
||||||
const secondaryField = getPropertyValue(entry, secondary) ?? '';
|
const secondaryField = getPropertyValue(entry, secondary) ?? '';
|
||||||
const subscribedData = subscriptions
|
const subscribedData = subscriptions
|
||||||
? subscriptions.map((id) => {
|
? subscriptions.flatMap((id) => {
|
||||||
|
if (!customFields[id]) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
const { label, colour } = customFields[id];
|
const { label, colour } = customFields[id];
|
||||||
return { id, label, colour, value: entry.custom[id] };
|
return [{ id, label, colour, value: entry.custom[id] }];
|
||||||
})
|
})
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user