feat: 对路由空内容报错 (#2388)

This commit is contained in:
Chenyang Shi
2019-06-12 17:57:29 +08:00
committed by DIYgod
parent 77ac67e2b0
commit 3dde0db910

View File

@@ -55,4 +55,8 @@ module.exports = async (ctx, next) => {
return item;
});
}
if (ctx.state.data && ctx.state.data.item.length === 0) {
throw Error('该路由目前获取内容为空请检查源站情况或前往https://github.com/DIYgod/RSSHub/issues反馈该问题');
}
};