Update getTagValues to handle undefined tag values field
authorMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Tue, 27 Nov 2018 23:05:42 +0000 (00:05 +0100)
committerMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Tue, 27 Nov 2018 23:05:42 +0000 (00:05 +0100)
Feature #14393

Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>

src/views-components/resource-properties-form/property-value-field.tsx

index a9edc8047bee6899175c2fc1ac61bd30c17a857b..9df29bd9bd514b528283b22fb5bfedaf3d1eb77c 100644 (file)
@@ -75,7 +75,7 @@ const isStrictTag = (tagName: string, vocabulary: Vocabulary) => {
 
 const getTagValues = (tagName: string, vocabulary: Vocabulary) => {
     const tag = vocabulary.tags[tagName];
-    return tag ? tag.values : [];
+    return tag && tag.values ? tag.values : [];
 };
 
 const ITEMS_PLACEHOLDER: string[] = [];