diff --git a/client/components/planning-editor-standalone/field-adapters/custom-vocabularies.ts b/client/components/planning-editor-standalone/field-adapters/custom-vocabularies.ts index efe4e3622..e9e3f41c9 100644 --- a/client/components/planning-editor-standalone/field-adapters/custom-vocabularies.ts +++ b/client/components/planning-editor-standalone/field-adapters/custom-vocabularies.ts @@ -37,7 +37,7 @@ export const getCustomVocabularyFields = () => { storageAdapter: { storeValue: (item, operationalValue: IVocabularyItem['qcode']) => { const vocabulary = allVocabularies.get(id); - const vocabItems = vocabulary.items.filter((x) => operationalValue.includes(x.qcode)) ?? []; + const vocabItems = vocabulary.items.filter((x) => operationalValue.includes(x.qcode)); // Subfield values const itemsToSubject: Array = vocabItems.map((x) => ({ diff --git a/client/components/planning-editor-standalone/profile.ts b/client/components/planning-editor-standalone/profile.ts index 2f91cf56e..1b6b6c380 100644 --- a/client/components/planning-editor-standalone/profile.ts +++ b/client/components/planning-editor-standalone/profile.ts @@ -15,7 +15,6 @@ import { } from '../../planning-extension/src/authoring-react-fields/planning-attachments/interfaces'; import {getCustomVocabularyFields} from './field-adapters/custom-vocabularies'; import {getPlanningProfileFields} from './profile-fields'; -import {IEventOrPlanningItem} from 'interfaces'; function getTextFieldConfig(options: {id: string; label: string, required: boolean}): IAuthoringFieldV2 { const editor3ConfigWithoutFormatting: IEditor3Config = { @@ -64,9 +63,9 @@ export interface IFieldDefinition { fieldId: string; getField: (options: {required: boolean, id: string}) => IAuthoringFieldV2; storageAdapter?: { - storeValue: (item: T, operationalValue: unknown) => T; // returns stored value + storeValue: (item: T, operationalValue: unknown) => T; // returns stored value retrieveStoredValue: - (item: T, fieldId: string) => unknown; // returns operational value + (item: T, fieldId: string) => unknown; // returns operational value }; }