Skip to content

Commit d1041bc

Browse files
committed
[DSC-2876] fix: handle string authority values in section-form-operations service
1 parent 0f65d07 commit d1041bc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/app/submission/sections/form/section-form-operations.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ export class SectionFormOperationsService {
241241
if ((event.model as DsDynamicInputModel).hasAuthority) {
242242
if (Array.isArray(value)) {
243243
value.forEach((authority, index) => {
244-
authority = Object.assign(new VocabularyEntry(), authority, {language});
244+
if (typeof authority === 'string') {
245+
authority = Object.assign(new VocabularyEntry(), { value: authority, language });
246+
} else {
247+
authority = Object.assign(new VocabularyEntry(), authority, {language});
248+
}
245249
value[index] = authority;
246250
});
247251
fieldValue = value;

0 commit comments

Comments
 (0)