Skip to content

Commit

Permalink
Fix CollapsibleComment in PlaylistDetails. Closes #2992
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed May 2, 2024
1 parent aef49cb commit 544ae90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ui/src/common/CollapsibleComment.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export const CollapsibleComment = ({ record }) => {
setExpanded(!expanded)
}, [expanded, setExpanded])

if (lines.length === 0) {
return null
}

return (
<Collapse
collapsedHeight={'2em'}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/playlist/PlaylistDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const PlaylistDetails = (props) => {
<Typography variant="h5" className={classes.title}>
{record.name || translate('ra.page.loading')}
</Typography>
<CollapsibleComment record={record} />
<Typography component="p">
{record.songCount ? (
<span>
Expand All @@ -67,6 +66,7 @@ const PlaylistDetails = (props) => {
<span>&nbsp;</span>
)}
</Typography>
<CollapsibleComment record={record} />
</CardContent>
</Card>
)
Expand Down

0 comments on commit 544ae90

Please sign in to comment.