mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix: No board name being displayed if it is empty
This commit is contained in:
parent
ddf7ddc2c1
commit
52d56e96a5
@ -30,9 +30,8 @@ const GalleryBoardName = (props: Props) => {
|
||||
const numOfBoardImages = useBoardTotal(selectedBoardId);
|
||||
|
||||
const formattedBoardName = useMemo(() => {
|
||||
if (!boardName || !numOfBoardImages) {
|
||||
return '';
|
||||
}
|
||||
if (!boardName) return '';
|
||||
if (boardName && !numOfBoardImages) return boardName;
|
||||
if (boardName.length > 20) {
|
||||
return `${boardName.substring(0, 20)}... (${numOfBoardImages})`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user