fix: album public page failing when no description

This commit is contained in:
Bobby 2022-05-05 13:23:18 +07:00
parent 11030ff2f5
commit a0adefc740
No known key found for this signature in database
GPG Key ID: 941839794CBF5A09

View File

@ -76,7 +76,9 @@ routes.get('/a/:identifier', async (req, res, next) => {
: `api/album/zip/${album.identifier}?v=${album.editedAt}` : `api/album/zip/${album.identifier}?v=${album.editedAt}`
album.url = `a/${album.identifier}` album.url = `a/${album.identifier}`
album.description = utils.md.instance.render(album.description) album.description = album.description
? utils.md.instance.render(album.description)
: null
return res.render('album', { return res.render('album', {
config, config,