fetch-event-source icon indicating copy to clipboard operation
fetch-event-source copied to clipboard

调用接口报错

Open Lyonoo1 opened this issue 1 year ago • 2 comments
trafficstars

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

Lyonoo1 avatar Jun 05 '24 04:06 Lyonoo1

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

Lyonoo1 avatar Jun 05 '24 04:06 Lyonoo1

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

LZQCN avatar Oct 28 '24 05:10 LZQCN