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 3, 2024
1 parent 5fb70fe commit 93a5c63
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 93a5c63

Please sign in to comment.