fix(striker-ui-api): handle empty select host detail query return

main
Tsu-ba-me 1 year ago
parent 3f9548f33e
commit 39cba349bd
  1. 6
      striker-ui-api/src/lib/request_handlers/host/buildQueryHostDetail.ts

@ -80,7 +80,11 @@ export const buildQueryHostDetail: BuildQueryDetailFunction = ({
const afterQueryReturn: QueryResultModifierFunction = const afterQueryReturn: QueryResultModifierFunction =
buildQueryResultModifier((output) => { buildQueryResultModifier((output) => {
const [hostName, hostType, hostUUID] = output[0]; if (output.length === 0) return {};
const {
0: [hostName, hostType, hostUUID],
} = output;
const shortHostName = getShortHostName(hostName); const shortHostName = getShortHostName(hostName);
return output.reduce< return output.reduce<

Loading…
Cancel
Save