Skip to content

Commit

Permalink
🐛 fix undefined categoryList
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Dec 14, 2022
1 parent dc63414 commit 8744150
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ async function getPage(req, res, next) {
if (category) {
page.category = category;
page.categoryList = await getPageListByTag(page.category);
} else {
page.categoryList = [];
}

res.locals.links = getLinks(page.id);
Expand Down

0 comments on commit 8744150

Please sign in to comment.