Skip to content

Commit

Permalink
fix redundant boolean error
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMarcMilletScality committed Sep 4, 2024
1 parent f7e7e33 commit 2358cff
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/react/utils/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,10 @@ export const useCheckIfBucketEmpty = (bucketName: string) => {
);

const isBucketEmpty = object
? !Boolean(
[
...(object.Versions ? object.Versions : []),
...(object.DeleteMarkers ? object.DeleteMarkers : []),
].length,
)
? ![
...(object.Versions ? object.Versions : []),
...(object.DeleteMarkers ? object.DeleteMarkers : []),
].length
: true;

return {
Expand Down

0 comments on commit 2358cff

Please sign in to comment.