diff --git a/striker-ui-api/src/lib/request_handlers/host/buildQueryHostDetail.ts b/striker-ui-api/src/lib/request_handlers/host/buildQueryHostDetail.ts index b3456e24..40831a96 100644 --- a/striker-ui-api/src/lib/request_handlers/host/buildQueryHostDetail.ts +++ b/striker-ui-api/src/lib/request_handlers/host/buildQueryHostDetail.ts @@ -80,7 +80,11 @@ export const buildQueryHostDetail: BuildQueryDetailFunction = ({ const afterQueryReturn: QueryResultModifierFunction = buildQueryResultModifier((output) => { - const [hostName, hostType, hostUUID] = output[0]; + if (output.length === 0) return {}; + + const { + 0: [hostName, hostType, hostUUID], + } = output; const shortHostName = getShortHostName(hostName); return output.reduce<