From f4eb8b6fc931f7ded138dceb2b9df4c63ac7e353 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sat, 26 Aug 2023 16:58:27 +0100 Subject: Differentiates getLocaleFromPath failure strategies --- src/components/ScotsounCdGallery.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/ScotsounCdGallery.astro') diff --git a/src/components/ScotsounCdGallery.astro b/src/components/ScotsounCdGallery.astro index 40940a1..e1a9aaf 100644 --- a/src/components/ScotsounCdGallery.astro +++ b/src/components/ScotsounCdGallery.astro @@ -1,9 +1,9 @@ --- import { getAllScotsoun } from '$data/scotsoun'; -import getLocaleFromPath from '$lib/getLocaleFromPath'; +import { getLocaleFromPathOrThrow } from '$lib/getLocaleFromPath'; import type Scotsoun from '$types/Scotsoun'; -const locale = getLocaleFromPath(Astro.url.pathname); +const locale = getLocaleFromPathOrThrow(Astro.url.pathname); const scotsoun = (await getAllScotsoun()).sort(scotsounIdDescending); function scotsounIdDescending(scotsoun1: Scotsoun, scotsoun2: Scotsoun) { -- cgit v1.2.3