fix: empty item error
This commit is contained in:
@@ -3,8 +3,8 @@ const he = require('he');
|
||||
module.exports = async (ctx, next) => {
|
||||
await next();
|
||||
|
||||
if (ctx.state.data && ctx.state.data.item.length === 0) {
|
||||
throw Error('该路由目前获取内容为空,请检查源站情况或前往https://github.com/DIYgod/RSSHub/issues反馈该问题');
|
||||
if (ctx.state.data && (!ctx.state.data.item || ctx.state.data.item.length === 0)) {
|
||||
throw Error('该路由目前获取内容为空,请检查源站情况或前往 https://github.com/DIYgod/RSSHub/issues 反馈该问题');
|
||||
}
|
||||
|
||||
// decode HTML entities
|
||||
@@ -59,8 +59,4 @@ 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反馈该问题');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user