Skip to content

Commit 97f37db

Browse files
committed
fix(plugins/nicklist): add check while grouping nicks by prefix
1 parent 0d74aae commit 97f37db

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

demo.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

plugins/nicklist.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default createPlugin(
6262
// group nicks by prefix
6363

6464
for (const nick in names) {
65-
const [prefix = ""] = names[nick].join("");
65+
const [prefix = ""] = (names[nick] ?? []).join("");
6666
nicks[prefix] ??= [];
6767
nicks[prefix].push(nick);
6868
}

0 commit comments

Comments
 (0)