diff --git a/client/components/planning-editor-standalone/field-definitions/subject.ts b/client/components/planning-editor-standalone/field-definitions/subject.ts index 4f9762bf4..c073b50fc 100644 --- a/client/components/planning-editor-standalone/field-definitions/subject.ts +++ b/client/components/planning-editor-standalone/field-definitions/subject.ts @@ -36,12 +36,12 @@ export function getSubjectField(): IFieldDefinition { return (item.subject ?? []).map(({qcode}) => qcode); }, storeValue: (item, operationalValue: Array) => { - const allSubjects: Array = (planningApi.redux.store.getState().subjects ?? []) + const filteredSubjects: Array = (planningApi.redux.store.getState().subjects ?? []) .filter((x) => operationalValue.includes(x.qcode)); return { ...item, - subject: allSubjects, + subject: filteredSubjects, }; }, }