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
Uncaught TypeError: Spread syntax requires ...iterable[Symbol.iterator] to be a function #2027
Comments
emm,我看 3.7.0 也还是 fetchInstance.run(...params); 呢。https://github.com/alibaba/hooks/blob/v3.7.0/packages/hooks/src/useRequest/src/useRequestImplement.ts |
这个改动我看了下提交记录,应该是 v2 -> v3 的时候改的 |
遇到同样的问题,排查了半天才发现,目前只能先把版本限定在 3.7.0 |
|
我这边已经确认,你反馈的打包产物不同是确实存在的。但是你不应该这样用啊: 类型检测都没法通过吧? |
这个问题我们会进一步定位 |
这个参数,从 v2 升级到 v3 的时候就只支持数组了,建议你把参数改为数组解决下问题。这个问题我们会进一步深度定位 @thinkingc |
目前锁定版本号3.7.0解决的 |
这个问题跟 #1939 是一样的, 原因和处理方式我都已经给出了,这个 issue 就先 close 了 大家还是得按照文档给的类型来传,不要以运行能用 就行,文档里面写的,我们就是会负责的,如果不按照文档里面要求的进行传递,容易出现问题。 |
"ahooks": "3.7.4",
错误信息:
突然今天构建就报上面的错误,排查发现是因为
3.7.4
版本与之前使用3.7.0
版本,在defaultParams
参数处理有改变:可以发现在
3.7.0
版本使用了__spread
函数对参数进行了处理,而3.7.4
版本去掉了这个处理。在我以前的代码中defaultParams
传的是一个对象不是数组,如:次用法在
3.7.4
版本上是报错的。ahooks这个修改算不算是一个破坏性的更新?
The text was updated successfully, but these errors were encountered: