fix: array/keyArray removed (#6245)

This commit is contained in:
1Computer1
2021-07-31 04:45:33 -04:00
committed by GitHub
parent 797727ab6e
commit bf221f2bef
4 changed files with 4 additions and 4 deletions

View File

@@ -500,7 +500,7 @@ class Util extends null {
* @private
*/
static setPosition(item, position, relative, sorted, route, reason) {
let updatedItems = sorted.array();
let updatedItems = [...sorted.values()];
Util.moveElementInArray(updatedItems, item, position, relative);
updatedItems = updatedItems.map((r, i) => ({ id: r.id, position: i }));
return route.patch({ data: updatedItems, reason }).then(() => updatedItems);