From 5d8a729ad74a8da84a53ac05bb551ec616b78929 Mon Sep 17 00:00:00 2001 From: Konstantin Markov Date: Thu, 3 Oct 2024 11:48:33 +0300 Subject: [PATCH] Fix default fallback (#2104) --- client/components/fields/editor/CustomVocabularies.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/components/fields/editor/CustomVocabularies.tsx b/client/components/fields/editor/CustomVocabularies.tsx index 467c0eea1..927dae8b8 100644 --- a/client/components/fields/editor/CustomVocabularies.tsx +++ b/client/components/fields/editor/CustomVocabularies.tsx @@ -56,7 +56,7 @@ class CustomVocabulariesComponent extends React.PureComponent { sortable={true} kind="synchronous" allowMultiple={true} - value={item.subject.filter((x) => x.scheme === cv._id)} + value={(item.subject ?? []).filter((x) => x.scheme === cv._id)} label={gettext(cv.display_name)} required={required ?? schema?.required} getOptions={() => arrayToTree(