We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
但是,如果前面步骤返回值是一个Promise的话,情况就不一样了 ———— 如果前面返回的是Promise对象,后面的then将会被当做这个返回的Promise的第一个then来对待。 这句话描述是有问题的,对于任何then语句后面的返回值,如果是非Promise,则会包装成一个Fullfiled的 Promise实例返回,这自然会触发下一个then的执行;如果返回的是Promise实例,就不一定了,是由Promise本身的状态决定的:pending、fullfiled或reject,这三个状态引发的动作是不一样的。 大家可以做一做实验。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
但是,如果前面步骤返回值是一个Promise的话,情况就不一样了 ———— 如果前面返回的是Promise对象,后面的then将会被当做这个返回的Promise的第一个then来对待。
这句话描述是有问题的,对于任何then语句后面的返回值,如果是非Promise,则会包装成一个Fullfiled的 Promise实例返回,这自然会触发下一个then的执行;如果返回的是Promise实例,就不一定了,是由Promise本身的状态决定的:pending、fullfiled或reject,这三个状态引发的动作是不一样的。
大家可以做一做实验。
The text was updated successfully, but these errors were encountered: