fix 500 when no software on device/:token page (#8292)

This commit is contained in:
Gabriel Hernandez
2022-10-18 17:50:59 +01:00
committed by GitHub
parent 69f1dc5176
commit efad41e578
2 changed files with 2 additions and 1 deletions
@@ -0,0 +1 @@
- fixes 500 error issue on details/:token page when host has software.
@@ -98,7 +98,7 @@ const DeviceUserPage = ({
onSuccess: (returnedHost: IHostResponse) => {
setShowRefetchSpinner(returnedHost.host.refetch_requested);
setIsPremiumTier(returnedHost.license.tier === "premium");
setHostSoftware(returnedHost.host.software);
setHostSoftware(returnedHost.host.software ?? []);
setHost(returnedHost.host);
setOrgLogoURL(returnedHost.org_logo_url);
if (returnedHost?.host.refetch_requested) {