From 658a58278cf2acc5ca78a1f811c929762eedae2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=A1=E5=B1=B1=E7=94=B5=E8=BD=A6?= Date: Sun, 16 Sep 2018 22:42:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BD=93feed=20item=E6=B2=A1?= =?UTF-8?q?=E6=9C=89description=E6=97=B6filterout=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=B5=B7=E4=BD=9C=E7=94=A8=E7=9A=84BUG=20(#7?= =?UTF-8?q?10)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RT --- middleware/parameter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/parameter.js b/middleware/parameter.js index 877f8d1d3..72687542a 100644 --- a/middleware/parameter.js +++ b/middleware/parameter.js @@ -16,7 +16,7 @@ module.exports = async (ctx, next) => { if (ctx.state.data && ctx.query && (ctx.query.filterout || ctx.query.filterout_title || ctx.query.filterout_description)) { ctx.state.data.item = ctx.state.data.item.filter((item) => { const title = item.title; - const description = item.description; + const description = item.description || title; return ( (ctx.query.filterout && !title.match(ctx.query.filterout) && !description.match(ctx.query.filterout)) || (ctx.query.filterout_title && !title.match(ctx.query.filterout_title)) ||