Fix author name matching bug - add optional chaining

This commit is contained in:
Zach Aw 2026-03-03 09:19:24 +08:00
parent 6d3404272c
commit 7113f001eb
3 changed files with 3 additions and 3 deletions

View file

@ -38,7 +38,7 @@ class AuthorController {
* @param {Response} res
*/
async findOne(req, res) {
const include = (req.query.include || '').split(',')
const include = (req?.query?.include || '').split(',')
const authorJson = req.author.toOldJSON()