mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 05:53:03 +00:00
only clone for add events
This commit is contained in:
@@ -250,10 +250,7 @@ export class SectionFormOperationsService {
|
||||
fieldValue = new FormFieldMetadataValueObject(value);
|
||||
}
|
||||
|
||||
// make a copy of fieldvalue for returning,
|
||||
// so any changes to it can't influence the original.
|
||||
// fixes #817
|
||||
return deepClone(fieldValue);
|
||||
return fieldValue;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -314,7 +311,7 @@ export class SectionFormOperationsService {
|
||||
event: DynamicFormControlEvent
|
||||
): void {
|
||||
const path = this.getFieldPathSegmentedFromChangeEvent(event);
|
||||
const value = this.getFieldValueFromChangeEvent(event);
|
||||
const value = deepClone(this.getFieldValueFromChangeEvent(event));
|
||||
if (isNotEmpty(value)) {
|
||||
value.place = this.getArrayIndexFromEvent(event);
|
||||
if (hasValue(event.group) && hasValue(event.group.value)) {
|
||||
|
Reference in New Issue
Block a user