From 95ca207002f484e2a4c87258325e60d9f174529c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Storl=C3=B8kken=20Melseth?= Date: Thu, 21 Sep 2023 16:16:12 +0200 Subject: [PATCH] fix: crash --- src/components/AppDetails/Versions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AppDetails/Versions.js b/src/components/AppDetails/Versions.js index 4e81de0..afcb83b 100644 --- a/src/components/AppDetails/Versions.js +++ b/src/components/AppDetails/Versions.js @@ -106,7 +106,7 @@ const VersionsTable = ({ {} ) - const { data: { groupVersions: dataStoreGroupVersions } = {}, loading } = useDataQuery(dataStoreQuery); + const { data: { groupVersions: dataStoreGroupVersions = {} } = {}, loading } = useDataQuery(dataStoreQuery); if (loading) { return null; @@ -131,7 +131,7 @@ const VersionsTable = ({ {versions.map((version) => { const versionActiveForUserGroup = Object .entries(dataStoreGroupVersions) - .find(([, dataStoreVersion]) => dataStoreVersion === version.version) + ?.find(([, dataStoreVersion]) => dataStoreVersion === version.version) ?.[0]; return (