diff --git a/src/react/utils/hooks.ts b/src/react/utils/hooks.ts index a5867292e..1c64c9e16 100644 --- a/src/react/utils/hooks.ts +++ b/src/react/utils/hooks.ts @@ -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 {