From 11bd92df3b10f84335444317264a705193183063 Mon Sep 17 00:00:00 2001 From: Hugos68 Date: Tue, 14 Jan 2025 20:47:01 +0100 Subject: [PATCH] format, fixed await --- .../src/routes/+layout.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sites/floating-ui-svelte.vercel.app/src/routes/+layout.ts b/sites/floating-ui-svelte.vercel.app/src/routes/+layout.ts index 494607f..1f56daa 100644 --- a/sites/floating-ui-svelte.vercel.app/src/routes/+layout.ts +++ b/sites/floating-ui-svelte.vercel.app/src/routes/+layout.ts @@ -12,18 +12,20 @@ async function getPageFind() { } async function getLatestVersion(fetcher: typeof fetch) { - const response = await fetcher("https://registry.npmjs.org/@skeletonlabs/floating-ui-svelte"); + const response = await fetcher( + "https://registry.npmjs.org/@skeletonlabs/floating-ui-svelte", + ); const data = await response.json(); - const version = data["dist-tags"].latest; + const version = data["dist-tags"].latest as string; return version; } export async function load({ fetch }) { - const version = getLatestVersion(fetch); + const version = await getLatestVersion(fetch); const pagefind = await getPageFind(); return { version: version, - pagefind: pagefind + pagefind: pagefind, }; }