summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-05-25 22:52:51 +0200
committerRory& <root@rory.gay>2026-05-25 22:52:51 +0200
commitcc9df708cece37fdd181264ca77b9eef05d3ce5c (patch)
tree1c9b5124b8a4bc9eb9fc3714d61044f3d121a278
parentFix db models build (diff)
downloadserver-ts-cc9df708cece37fdd181264ca77b9eef05d3ce5c.tar.xz
channelOrdering: fix null ref
-rw-r--r--src/util/entities/Guild.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/entities/Guild.ts b/src/util/entities/Guild.ts

index aa6816c2..aea911eb 100644 --- a/src/util/entities/Guild.ts +++ b/src/util/entities/Guild.ts
@@ -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;