mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix a thing (#1921)
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user