From 4ed1a1ae7f4596e658035c6ea548ff0ebc41c469 Mon Sep 17 00:00:00 2001 From: Prospector <6166773+Prospector@users.noreply.github.com> Date: Tue, 20 Jan 2026 13:51:25 -0800 Subject: [PATCH] attempt to safeguard some potential errors on user and collection pages (#5169) * attempt to safeguard some potential errors on user and collection pages * prepr --- apps/frontend/src/pages/collection/[id].vue | 4 ++-- apps/frontend/src/pages/user/[id].vue | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/frontend/src/pages/collection/[id].vue b/apps/frontend/src/pages/collection/[id].vue index 9a6d343ad..311237fe6 100644 --- a/apps/frontend/src/pages/collection/[id].vue +++ b/apps/frontend/src/pages/collection/[id].vue @@ -174,12 +174,12 @@ diff --git a/apps/frontend/src/pages/user/[id].vue b/apps/frontend/src/pages/user/[id].vue index cef2741ad..a4208505b 100644 --- a/apps/frontend/src/pages/user/[id].vue +++ b/apps/frontend/src/pages/user/[id].vue @@ -757,11 +757,11 @@ useSeoMeta({ const projectTypes = computed(() => { const obj = {} - if (collections.value.length > 0) { + if (collections.value?.length > 0) { obj.collection = true } - for (const project of projects.value) { + for (const project of projects.value ?? []) { obj[project.project_type] = true } @@ -772,7 +772,7 @@ const projectTypes = computed(() => { const sumDownloads = computed(() => { let sum = 0 - for (const project of projects.value) { + for (const project of projects.value ?? []) { sum += project.downloads }