(cards) process usernames with trailing dots (somehow some of them exist) correctly

This commit is contained in:
Valentyne Stigloher 2025-01-27 15:55:46 +01:00
parent 688e7c773d
commit 73245a844f

View File

@ -102,7 +102,7 @@ const shoot = async (db: Database, mode: 'light' | 'dark'): Promise<void> => {
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!');