Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc committed Dec 11, 2024
1 parent eefc8c7 commit ccc803a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const getCustomVocabularyFields = () => {
}));

// Remove values that don't match the "subfield" ID, so there's no item duplication
const restOfValues = item.subject.filter((x) => x.scheme !== id);
const restOfValues = (item.subject ?? []).filter((x) => x.scheme !== id);

return {
...item,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type IFieldConverted = IBaseField<'normal'> | ICustomVocabularyField;
export const getProfileFieldsConverted = (): Array<IFieldConverted> => {
const planningProfile = planningApi.contentProfiles.get('planning');
const planningGroups = getEditorFormGroupsFromProfile(planningProfile);
const planningFieldIds = flatMap(Object.values(planningGroups).map((x) => x.fields));
const planningFieldIds = Object.values(planningGroups).flatMap((x) => x.fields);
const convertedFieldIds: Array<IFieldConverted> = [];

for (const fieldId of planningFieldIds) {
Expand Down

0 comments on commit ccc803a

Please sign in to comment.