mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00
fix issue where the first relationship of a type wouldn't be added
This commit is contained in:
@@ -294,6 +294,20 @@ function flushOperation(state: JsonPatchOperationsState, action: FlushPatchOpera
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new operation to a patch
|
||||
*
|
||||
* @param body
|
||||
* The current patch
|
||||
* @param actionType
|
||||
* The type of operation to add
|
||||
* @param targetPath
|
||||
* The path for the operation
|
||||
* @param value
|
||||
* The new value
|
||||
* @param fromPath
|
||||
* The previous path (in case of a move operation)
|
||||
*/
|
||||
function addOperationToList(body: JsonPatchOperationObject[], actionType, targetPath, value?, fromPath?) {
|
||||
const newBody = Array.from(body);
|
||||
switch (actionType) {
|
||||
|
Reference in New Issue
Block a user