From 5ee069a5bdf2a7ad44fca547150416ba14867630 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 14 Mar 2023 01:33:11 +0100 Subject: [PATCH] fix(backend): don't try to link to malformed pronouns --- frontend/src/lib/components/PronounLink.svelte | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/PronounLink.svelte b/frontend/src/lib/components/PronounLink.svelte index 59acf21..bd73bf6 100644 --- a/frontend/src/lib/components/PronounLink.svelte +++ b/frontend/src/lib/components/PronounLink.svelte @@ -9,8 +9,14 @@ } else { const split = pronouns.pronouns.split("/"); 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; -{pronounText} +{#if shouldLink} + {pronounText} +{:else} + {pronounText} +{/if}