« get me outta code hell

fix date added to wiki showing current date - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-03-07 00:34:22 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-03-07 00:34:22 -0400
commit0126aca3e2c3d265be0d52728ce031ab27e380f3 (patch)
tree000ba12ea0e4158269a68d2a0c02d2ce95c4689d /src/page
parente1141ea9d7554ac03bd1831bf882a45706e0b46b (diff)
fix date added to wiki showing current date
Diffstat (limited to 'src/page')
-rw-r--r--src/page/album.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/page/album.js b/src/page/album.js
index 6bcff886..b9965547 100644
--- a/src/page/album.js
+++ b/src/page/album.js
@@ -210,13 +210,15 @@ export function write(album, {wikiData}) {
                                 ${album.tracks.map(trackToListItem).join('\n')}
                             </${listTag}>
                         `}
-                        <p>
-                            ${[
-                                strings('releaseInfo.addedToWiki', {
-                                    date: strings.count.date(album.dateAdded)
-                                })
-                            ].filter(Boolean).join('<br>\n')}
-                        </p>
+                        ${album.dateAddedToWiki && fixWS`
+                            <p>
+                                ${[
+                                    strings('releaseInfo.addedToWiki', {
+                                        date: strings.count.date(album.dateAddedToWiki)
+                                    })
+                                ].filter(Boolean).join('<br>\n')}
+                            </p>
+                        `}
                         ${album.commentary && fixWS`
                             <p>${strings('releaseInfo.artistCommentary')}</p>
                             <blockquote>