Skip to content

开源中国资讯源添加 filter 后报错 #1808

@dxmpalb

Description

@dxmpalb

路由地址

https://rsshub.app/oschina/news

预期是什么?

比如打开路由:https://rsshub.app/oschina/news ,不加参数时正常,但是添加参数https://rsshub.app/oschina/news?filter=乱弹 ,或者其他参数时,预期应该正常输出(就算没有相关内容返回0条item即可)。

实际发生了什么?

实际有时候(大多数情况下)加参数之后报TypeError错误,极少数情况下会正常输出,查看代码并没有发现哪里有问题(初学太菜。。)

部署相关信息

演示地址和自己本地部署都会出现同样的问题。

额外信息(日志、报错等)

RSSHub 发生了一些意外:
TypeError: Cannot read property 'match' of undefined
at ctx.state.data.item.ctx.state.data.item.filter (/app/lib/middleware/parameter.js:24:45)
at Array.filter ()
at module.exports (/app/lib/middleware/parameter.js:19:51)
at processTicksAndRejections (internal/process/next_tick.js:81:5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions