fix(frontend): fall back to full pronoun set if it's a malformed set

This commit is contained in:
Sam 2023-04-17 16:22:45 +02:00
parent 3ef4c715e7
commit ec6b048501
No known key found for this signature in database
GPG Key ID: B4EF20DDE721CAA1
1 changed files with 2 additions and 2 deletions

View File

@ -20,8 +20,8 @@
return pronouns.display_text;
} else {
const split = pronouns.pronouns.split("/");
if (split.length < 2) return split.join("/");
else return split.slice(0, 2).join("/");
if (split.length === 5) return split.splice(0, 2).join("/");
return pronouns.pronouns;
}
})
.join(", ");