diff --git a/scripts/apps/workspace/content/views/FormattingOptionsMultiSelect.tsx b/scripts/apps/workspace/content/views/FormattingOptionsMultiSelect.tsx index 3adf87a8a6..c0b9d683ef 100644 --- a/scripts/apps/workspace/content/views/FormattingOptionsMultiSelect.tsx +++ b/scripts/apps/workspace/content/views/FormattingOptionsMultiSelect.tsx @@ -8,7 +8,7 @@ import { import {IArticleField} from 'superdesk-api'; interface IProps { - value: Array; + value: Array | null; fieldId: string; fields: Dictionary; onChange(value: Array, fieldId: string): void; @@ -28,9 +28,11 @@ export class FormattingOptionsTreeSelect extends React.Component { ) .map(([notTranslatedOption, translatedOption]) => ({value: [notTranslatedOption, translatedOption]})); - const values = formattingOptions - .filter((option) => this.props.value.includes(option.value[0])) - .map((option) => option.value); + const values = this.props.value != null + ? formattingOptions + .filter((option) => this.props.value.includes(option.value[0])) + .map((option) => option.value) + : []; return (