alibaba / hooks

A high-quality & reliable React Hooks library. https://ahooks.pages.dev/
https://ahooks.js.org/
MIT License
13.91k stars 2.69k forks source link

taro开发小程序使用umihook提示Cannot use 'in' operator to search for 'URLSearchParams' in undefined #360

Closed birdycn closed 4 years ago

birdycn commented 4 years ago

Cannot use 'in' operator to search for 'URLSearchParams' in undefined TypeError: Cannot use 'in' operator to search for 'URLSearchParams' in undefined at Module../node_modules/_whatwg-fetch@3.0.0@whatwg-fetch/fetch.js

请问有什么解决办法吗

brickspert commented 4 years ago

贴一下用法?你是用了 useRequest 吗?看着像是 umi-request 依赖的底层库报错。

brickspert commented 4 years ago

你可以换个请求库试试:https://hooks.umijs.org/hooks/async#useapiprovider