mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 20:42:27 +00:00
fix a thing (#1921)
This commit is contained in:
parent
2ffe3048ba
commit
f4c2d6dfa2
1 changed files with 2 additions and 2 deletions
|
|
@ -302,11 +302,11 @@ class Util {
|
|||
.sort((a, b) => a.rawPosition - b.rawPosition || Long.fromString(a.id).sub(Long.fromString(b.id)).toNumber());
|
||||
}
|
||||
|
||||
static setPosition(item, position, relative, sorted, route, handle, reason) {
|
||||
static setPosition(item, position, relative, sorted, route, reason) {
|
||||
let updatedItems = sorted.array();
|
||||
Util.moveElementInArray(updatedItems, item, position, relative);
|
||||
updatedItems = updatedItems.map((r, i) => ({ id: r.id, position: i }));
|
||||
return route.patch({ data: updatedItems, reason }).then(handle || (x => x));
|
||||
return route.patch({ data: updatedItems, reason });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue