Merge pull request #74 from feedingaliencat/588-chores-starting-with-digit

ChoreCard: Fix rendering of chores names starting with a digit
This commit is contained in:
Mohamad Tarbin
2026-03-30 01:08:57 -04:00
committed by GitHub

View File

@@ -78,7 +78,7 @@ const ChoreCard = ({
const getName = name => { const getName = name => {
const split = Array.from(chore.name) const split = Array.from(chore.name)
// if the first character is emoji then remove it from the 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 split.slice(1).join('').trim()
} }
return name return name