From 73245a844f68dba840a130e7987469eeb4847412 Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Mon, 27 Jan 2025 15:55:46 +0100 Subject: [PATCH] (cards) process usernames with trailing dots (somehow some of them exist) correctly --- server/cards.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/cards.ts b/server/cards.ts index db282570a..129162f19 100644 --- a/server/cards.ts +++ b/server/cards.ts @@ -102,7 +102,7 @@ const shoot = async (db: Database, mode: 'light' | 'dark'): Promise => { console.log(`Uploading @${username} (${locale}, ${mode}) – ${cardId}`); - const buffer = results[`${locale}/${username.replace(/\.+$/, '').replace(/[^A-Za-z0-9.-]/g, '_')}`]; + const buffer = results[`${locale}/${username.replace(/[^A-Za-z0-9.-]/g, '_')}`]; if (buffer === undefined) { console.error('Cannot find the proper buffer!');