mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
fix exception when adding a field for a repeatable dropdown
This commit is contained in:
@@ -28,6 +28,7 @@ import { FormBuilderService } from '../../../shared/form/builder/form-builder.se
|
|||||||
import { FormFieldMetadataValueObject } from '../../../shared/form/builder/models/form-field-metadata-value.model';
|
import { FormFieldMetadataValueObject } from '../../../shared/form/builder/models/form-field-metadata-value.model';
|
||||||
import { DynamicQualdropModel } from '../../../shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-qualdrop.model';
|
import { DynamicQualdropModel } from '../../../shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-qualdrop.model';
|
||||||
import { DynamicRelationGroupModel } from '../../../shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model';
|
import { DynamicRelationGroupModel } from '../../../shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model';
|
||||||
|
import { deepClone } from 'fast-json-patch';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The service handling all form section operations
|
* The service handling all form section operations
|
||||||
@@ -249,7 +250,10 @@ export class SectionFormOperationsService {
|
|||||||
fieldValue = new FormFieldMetadataValueObject(value);
|
fieldValue = new FormFieldMetadataValueObject(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return fieldValue;
|
// make a copy of fieldvalue for returning,
|
||||||
|
// so any changes to it can't influence the original.
|
||||||
|
// fixes #817
|
||||||
|
return deepClone(fieldValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user