Skip to content

🎧 Your Personal Streaming Service

Fix CollapsibleComment in PlaylistDetails. Closes #2992

Deluan544ae90ec17b
diff --git a/ui/src/common/CollapsibleComment.js b/ui/src/common/CollapsibleComment.js
index f0485b2e8..8660d0492 100644
--- a/ui/src/common/CollapsibleComment.js
+++ b/ui/src/common/CollapsibleComment.js
@@ -39,6 +39,10 @@ export const CollapsibleComment = ({ record }) => {
setExpanded(!expanded)
}, [expanded, setExpanded])
+ if (lines.length === 0) {
+ return null
+ }
+
return (
<Collapse
collapsedHeight={'2em'}
diff --git a/ui/src/playlist/PlaylistDetails.js b/ui/src/playlist/PlaylistDetails.js
index 80ac07c35..f8c06bba7 100644
--- a/ui/src/playlist/PlaylistDetails.js
+++ b/ui/src/playlist/PlaylistDetails.js
@@ -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>
@@ -67,6 +66,7 @@ const PlaylistDetails = (props) => {
<span>&nbsp;</span>
)}
</Typography>
+ <CollapsibleComment record={record} />
</CardContent>
</Card>
)