fix filtering empty title, close #1808

This commit is contained in:
DIYgod
2019-03-23 00:48:41 +08:00
parent f4a958d93a
commit d70cba4c8e

View File

@@ -17,7 +17,7 @@ module.exports = async (ctx, next) => {
// filter
if (ctx.state.data && ctx.query && (ctx.query.filter || ctx.query.filter_title || ctx.query.filter_description || ctx.query.filter_author)) {
ctx.state.data.item = ctx.state.data.item.filter((item) => {
const title = item.title;
const title = item.title || '';
const description = item.description || title;
const author = item.author || '';
return !(