Skip to content

Commit

Permalink
fix: typescript error
Browse files Browse the repository at this point in the history
  • Loading branch information
devcatalin committed Apr 20, 2023
1 parent 8ada0bb commit 3f02bc2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/redux/thunks/cluster/loadClusterResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,7 @@ async function loadCustomResourceObjects(
return [];
}

const getItemsFromResponseBody = (body: object) => {
if ('items' in body && isArray(body.items)) {
return body.items;
}
return [];
const getItemsFromResponseBody = (body: any) => {
const items = 'items' in body ? body.items : [];
return isArray(items) ? items : [];
};

0 comments on commit 3f02bc2

Please sign in to comment.