fix(backend): don't try to link to malformed pronouns
This commit is contained in:
parent
fb8733befa
commit
5ee069a5bd
|
@ -9,8 +9,14 @@
|
||||||
} else {
|
} else {
|
||||||
const split = pronouns.pronouns.split("/");
|
const split = pronouns.pronouns.split("/");
|
||||||
if (split.length < 2) pronounText = split.join("/");
|
if (split.length < 2) pronounText = split.join("/");
|
||||||
else pronounText = split.slice(0, 2).join("/")
|
else pronounText = split.slice(0, 2).join("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const shouldLink = pronouns.pronouns.split("/").length === 5;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<a href="/pronouns/{pronouns.pronouns}">{pronounText}</a>
|
{#if shouldLink}
|
||||||
|
<a href="/pronouns/{pronouns.pronouns}">{pronounText}</a>
|
||||||
|
{:else}
|
||||||
|
{pronounText}
|
||||||
|
{/if}
|
||||||
|
|
Loading…
Reference in New Issue