fix: don't expect at least 1 channel for concat

This commit is contained in:
Paul
2021-12-24 20:41:33 +00:00
parent 20d7a629f0
commit 97ecdf0d84
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "revolt.js",
"version": "5.2.1-patch.1",
"version": "5.2.1-patch.2",
"main": "dist/index.js",
"repository": "https://github.com/revoltchat/revolt.js",
"author": "Paul Makles <insrt.uk>",
+1 -1
View File
@@ -1,4 +1,4 @@
export const LIBRARY_VERSION = "5.2.1-patch.1";
export const LIBRARY_VERSION = "5.2.1-patch.2";
export const defaultConfig = {
apiURL: "https://api.revolt.chat",
+1 -1
View File
@@ -63,7 +63,7 @@ export class Server {
.filter(channel => !permit?.isMuted(channel))
.map((channel) => channel?.mentions) as string[][];
return arr[0].concat(...arr.slice(1));
return ([] as string[]).concat(...arr);
}
constructor(client: Client, data: ServerI) {