ChoreCard: Fix rendering of chores names starting with a digit

This commit is contained in:
Emilio Veloci
2026-03-12 16:32:41 +01:00
parent 5ec2db5dca
commit 4b1bd48487

View File

@@ -78,7 +78,7 @@ const ChoreCard = ({
const getName = name => {
const split = Array.from(chore.name)
// if the first character is emoji then remove it from the name
if (/\p{Emoji}/u.test(split[0])) {
if (isNaN(Number(split[0])) && /\p{Emoji}/u.test(split[0])) {
return split.slice(1).join('').trim()
}
return name