Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

调用接口报错 #82

Open
Lyonoo1 opened this issue Jun 5, 2024 · 2 comments
Open

调用接口报错 #82

Lyonoo1 opened this issue Jun 5, 2024 · 2 comments

Comments

@Lyonoo1
Copy link

Lyonoo1 commented Jun 5, 2024

我在A页面点击按钮才会去执行fetchEventSource,刚开始进入页面调用一切正常。 当我点击A页面中的跳转路由按钮后用的react-router的useHistory跳转。再回到A页面 再次点击按钮调用fetchEventSource会报错,是fetchEventSourc().catch() catch中报出的错误:error TypeError: Cannot convert undefined or null to object
at getOwnPropertySymbols ()

@Lyonoo1
Copy link
Author

Lyonoo1 commented Jun 5, 2024

我自己写的代码中没有用到getOwnPropertySymbols

@LZQCN
Copy link

LZQCN commented Oct 28, 2024

你调用 fetchEventSource 时,第二个参数传错了,必须传个对象,不然这个函数在通过__rest polyfill处理剩余参数时就会报这个错误。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants