diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-06-08 10:32:07 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-06-08 10:32:07 -0300 |
commit | c36d6b999a554733ad4f3397f8047eb9f40db95e (patch) | |
tree | e7712dda16a7ac6780880d12ab1a384d6f67c602 /src | |
parent | e1f8beeb384ad4a1a30f2654e17008ae730adf56 (diff) |
content: generate{Track,Album}InfoPage: handle null cover properly
Diffstat (limited to 'src')
-rw-r--r-- | src/content/dependencies/generateAlbumInfoPage.js | 9 | ||||
-rw-r--r-- | src/content/dependencies/generateTrackInfoPage.js | 10 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/content/dependencies/generateAlbumInfoPage.js b/src/content/dependencies/generateAlbumInfoPage.js index b049f90e..1e8fa194 100644 --- a/src/content/dependencies/generateAlbumInfoPage.js +++ b/src/content/dependencies/generateAlbumInfoPage.js @@ -208,10 +208,11 @@ export default { additionalStyleRules: [relations.albumStyleRules], cover: - relations.cover - ?.slots({ - alt: language.$('misc.alt.albumCover'), - }), + (relations.cover + ? relations.cover.slots({ + alt: language.$('misc.alt.albumCover'), + }) + : null), mainContent: [ html.tag('p', diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js index 7d306715..745e367e 100644 --- a/src/content/dependencies/generateTrackInfoPage.js +++ b/src/content/dependencies/generateTrackInfoPage.js @@ -359,10 +359,12 @@ export default { colorStyleRules: [relations.colorStyleRules], additionalStyleRules: [relations.albumStyleRules], - cover: relations.cover - ?.slots({ - alt: language.$('misc.alt.trackCover'), - }), + cover: + (relations.cover + ? relations.cover.slots({ + alt: language.$('misc.alt.trackCover'), + }) + : null), mainContent: [ html.tag('p', { |