diff --git a/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/GalleryBoard.tsx b/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/GalleryBoard.tsx index 33f5a7c5b3..90fa6d6425 100644 --- a/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/GalleryBoard.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/GalleryBoard.tsx @@ -77,12 +77,12 @@ const GalleryBoard = ({ const { data: imagesTotal } = useGetBoardImagesTotalQuery(board.board_id); const { data: assetsTotal } = useGetBoardAssetsTotalQuery(board.board_id); const tooltip = useMemo(() => { - if (!imagesTotal?.total || !assetsTotal?.total) { + if (imagesTotal?.total === undefined || assetsTotal?.total === undefined) { return undefined; } - return `${imagesTotal.total} image${imagesTotal.total > 1 ? 's' : ''}, ${ + return `${imagesTotal.total} image${imagesTotal.total === 1 ? '' : 's'}, ${ assetsTotal.total - } asset${assetsTotal.total > 1 ? 's' : ''}`; + } asset${assetsTotal.total === 1 ? '' : 's'}`; }, [assetsTotal, imagesTotal]); const { currentData: coverImage } = useGetImageDTOQuery( diff --git a/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/NoBoardBoard.tsx b/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/NoBoardBoard.tsx index 2d2d116928..2bcc466108 100644 --- a/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/NoBoardBoard.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/NoBoardBoard.tsx @@ -48,12 +48,12 @@ const NoBoardBoard = memo(({ isSelected }: Props) => { const { data: imagesTotal } = useGetBoardImagesTotalQuery('none'); const { data: assetsTotal } = useGetBoardAssetsTotalQuery('none'); const tooltip = useMemo(() => { - if (!imagesTotal?.total || !assetsTotal?.total) { + if (imagesTotal?.total === undefined || assetsTotal?.total === undefined) { return undefined; } - return `${imagesTotal.total} image${imagesTotal.total > 1 ? 's' : ''}, ${ + return `${imagesTotal.total} image${imagesTotal.total === 1 ? '' : 's'}, ${ assetsTotal.total - } asset${assetsTotal.total > 1 ? 's' : ''}`; + } asset${assetsTotal.total === 1 ? '' : 's'}`; }, [assetsTotal, imagesTotal]); const handleMouseOver = useCallback(() => {