diff --git a/src/react/components/common/tagInput/tagInput.tsx b/src/react/components/common/tagInput/tagInput.tsx index 8ecad1d08..0b5b84763 100644 --- a/src/react/components/common/tagInput/tagInput.tsx +++ b/src/react/components/common/tagInput/tagInput.tsx @@ -580,7 +580,7 @@ export class TagInput extends React.Component { } } public labelAssigned = (labels: ILabel[], name): boolean => { - const label = labels.find((label) => label.label === name ? true : false); + const label = labels?.find((label) => label.label === name ? true : false); if (!label) { return false; } else { @@ -589,7 +589,7 @@ export class TagInput extends React.Component { } public labelAssignedDrawnRegion = (labels: ILabel[], name): boolean => { - const label = labels.find((label) => label.label === name ? true : false); + const label = labels?.find((label) => label.label === name ? true : false); if (label?.labelType === FeatureCategory.DrawnRegion) { return true; } else { diff --git a/src/react/components/pages/editorPage/editorPage.tsx b/src/react/components/pages/editorPage/editorPage.tsx index 7faf0ad61..3fea87141 100644 --- a/src/react/components/pages/editorPage/editorPage.tsx +++ b/src/react/components/pages/editorPage/editorPage.tsx @@ -508,7 +508,7 @@ export default class EditorPage extends React.Component