From db0a5f276eb2a2f9dcfbd53e458a355ea4b98aa3 Mon Sep 17 00:00:00 2001 From: Frank van Puffelen Date: Wed, 11 Sep 2024 14:06:15 -0700 Subject: [PATCH] Only render AlsoOn component when there are links Somehow the existence length check didn't work for empty arrays, but a compare against 0 does. --- src/components/AlsoOn.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AlsoOn.astro b/src/components/AlsoOn.astro index 0156225..ae0e376 100644 --- a/src/components/AlsoOn.astro +++ b/src/components/AlsoOn.astro @@ -14,7 +14,7 @@ function getSocialLinkType(link) { if (new RegExp("https\://stackoverflow.com/").test(link)) return "stackoverflow"; } --- -{ links?.length && ( +{ links?.length > 0 && (