fetch-event-source
fetch-event-source copied to clipboard
调用接口报错
trafficstars
我在A页面点击按钮才会去执行fetchEventSource,刚开始进入页面调用一切正常。 当我点击A页面中的跳转路由按钮后用的react-router的useHistory跳转。再回到A页面 再次点击按钮调用fetchEventSource会报错,是fetchEventSourc().catch() catch中报出的错误:error TypeError: Cannot convert undefined or null to object
at getOwnPropertySymbols (
我自己写的代码中没有用到getOwnPropertySymbols
你调用 fetchEventSource 时,第二个参数传错了,必须传个对象,不然这个函数在通过__rest polyfill处理剩余参数时就会报这个错误。