From f7e17080399146e34749901f7b23498149aa18bf Mon Sep 17 00:00:00 2001 From: BordedDev <> Date: Sun, 1 Jun 2025 20:53:02 +0200 Subject: [PATCH] Compacted code --- src/snek/static/chat-input.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/snek/static/chat-input.js b/src/snek/static/chat-input.js index cb7fa47..8405e26 100644 --- a/src/snek/static/chat-input.js +++ b/src/snek/static/chat-input.js @@ -67,13 +67,7 @@ class ChatInputComponent extends HTMLElement { } getAuthors() { - let authors = [] - for (let i = 0; i < this.users.length; i++) { - authors.push(this.users[i].username) - authors.push(this.users[i].nick) - } - return authors - + return this.users.flatMap((user) => [user.username, user.nick]) } extractMentions(text) {