fix(middleware): simplecc null description (#8053)
This commit is contained in:
parent
202d457f23
commit
eb2037c5d1
|
|
@ -235,8 +235,8 @@ module.exports = async (ctx, next) => {
|
|||
// opencc
|
||||
if (ctx.query.opencc) {
|
||||
ctx.state.data.item.forEach((item) => {
|
||||
item.title = simplecc(item.title, ctx.query.opencc);
|
||||
item.description = simplecc(item.description, ctx.query.opencc);
|
||||
item.title = simplecc(item.title ?? item.link, ctx.query.opencc);
|
||||
item.description = simplecc(item.description ?? item.title ?? item.link, ctx.query.opencc);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue