summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src/pages/s
diff options
context:
space:
mode:
authorJay V <[email protected]>2025-06-20 15:38:47 -0400
committerJay V <[email protected]>2025-06-20 15:50:12 -0400
commit4df40e0d9bde6fe44886910a4c1f9059721ecae2 (patch)
tree8086d7103fff5da38e4131d2efcd9b13b7137b00 /packages/web/src/pages/s
parentb72e17a8b7b26cc1ad55ebd2fd15b28015a3d95b (diff)
downloadopencode-4df40e0d9bde6fe44886910a4c1f9059721ecae2.tar.gz
opencode-4df40e0d9bde6fe44886910a4c1f9059721ecae2.zip
docs: share page bugs
Diffstat (limited to 'packages/web/src/pages/s')
-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";