From 4206f46cf4091102ac4fd6dd2499d78c67a4988d Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Thu, 15 Sep 2022 15:03:00 -0700 Subject: [PATCH] only if reports exist --- packages/client/src/pages/admin/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/pages/admin/index.vue b/packages/client/src/pages/admin/index.vue index 9430c9b1f4..baed758a8c 100644 --- a/packages/client/src/pages/admin/index.vue +++ b/packages/client/src/pages/admin/index.vue @@ -65,7 +65,7 @@ os.api('admin/abuse-user-reports', { state: 'unresolved', limit: 1, }).then(reports => { - if (reports.length > 0) thereIsUnresolvedAbuseReport = true; + if (reports?.length > 0) thereIsUnresolvedAbuseReport = true; }); await fetch('https://codeberg.org/api/v1/repos/thatonecalculator/calckey/releases?draft=false&pre-release=false&page=1&limit=1')