diff --git a/src/components/instantlaunches/functions.js b/src/components/instantlaunches/functions.js index cc7a28c83..0845009c0 100644 --- a/src/components/instantlaunches/functions.js +++ b/src/components/instantlaunches/functions.js @@ -1,11 +1,11 @@ /** - * Removes a suffix from the username. Everything after the last '@' will be removed. + * Removes a suffix from the username. Everything starting from the first '@' will be removed. * * @param {string} username - The username that will be shortened * @returns {string} - The shortened username */ export const shortenUsername = (username) => { - const atIndex = username.lastIndexOf("@"); + const atIndex = username.indexOf("@"); if (atIndex > -1) { return username.slice(0, atIndex); }