Skip to content

Commit d07bc41

Browse files
committed
chore: always include default category in Server#orderedChannels
1 parent 0f2ef80 commit d07bc41

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

src/classes/Server.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -236,21 +236,22 @@ export class Server {
236236
}
237237
}
238238

239-
if (uncategorised.size > 0) {
240-
const channels = [...uncategorised].map(
241-
(key) => this.#collection.client.channels.get(key)!,
242-
);
239+
// force Default category for client logic
240+
// if (uncategorised.size > 0) {
241+
const channels = [...uncategorised].map(
242+
(key) => this.#collection.client.channels.get(key)!,
243+
);
243244

244-
if (defaultCategory) {
245-
defaultCategory.channels = [...defaultCategory.channels, ...channels];
246-
} else {
247-
elements.unshift({
248-
id: "default",
249-
title: "Default",
250-
channels,
251-
});
252-
}
245+
if (defaultCategory) {
246+
defaultCategory.channels = [...defaultCategory.channels, ...channels];
247+
} else {
248+
elements.unshift({
249+
id: "default",
250+
title: "Default",
251+
channels,
252+
});
253253
}
254+
// }
254255

255256
return elements;
256257
}

0 commit comments

Comments
 (0)