Skip to content

customRequest = async function error reqs[uid].abort() not a function #178

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

Closed
Chryseis opened this issue Apr 30, 2019 · 2 comments · May be fixed by ajesse11x/ant-design#5 or ajesse11x/ant-design#8
Closed

Comments

@Chryseis
Copy link

Chryseis commented Apr 30, 2019

当customRequest 是一个async方法时 最好判断返回是不是一个Promise 再执行

@chenshuai2144
Copy link

你想要解决什么问题呢?

@Chryseis
Copy link
Author

customRequest={async ()=>{
   const res = await fetch(url);
  ...
 return {
    abort(){
         .....
    }
}
}}

会报reqs[uid].abort() not a function

因为 async 返回了一个 promise 对象

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