summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'packages/web/src/pages')
-rw-r--r--packages/web/src/pages/s/[id].astro7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/web/src/pages/s/[id].astro b/packages/web/src/pages/s/[id].astro
index 502784f86..7e8c7238f 100644
--- a/packages/web/src/pages/s/[id].astro
+++ b/packages/web/src/pages/s/[id].astro
@@ -11,6 +11,13 @@ const { id } = Astro.params;
const res = await fetch(`${apiUrl}/share_data?id=${id}`);
const data = await res.json();
+if (!data.info) {
+ return new Response(null, {
+ status: 404,
+ statusText: 'Not found'
+ });
+}
+
const models: Set<string> = new Set();
const version = data.info.version ? `v${data.info.version}` : "v0.0.1";