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

View file

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