channelOrdering: fix null ref

This commit is contained in:
Rory&
2026-05-25 22:52:51 +02:00
parent 3d79fafe40
commit cc9df708ce
+2
View File
@@ -462,6 +462,8 @@ export class Guild extends BaseClass {
select: { channel_ordering: true },
});
guild.channel_ordering ??= [];
let position;
if (typeof insertPoint == "string") position = guild.channel_ordering.indexOf(insertPoint) + 1;
else position = insertPoint;