Merge pull request #1008 from jacty/patch-1

优化了 async 函数内部报错会导致 Promise 对象变为`reject`状态的例子
This commit is contained in:
Ruan YiFeng
2020-09-15 17:17:25 +08:00
committed by GitHub
+3 -3
View File
@@ -184,10 +184,10 @@ async function f() {
}
f().then(
v => console.log(v),
e => console.log(e)
v => console.log(resolve,v),
e => console.log('reject',e)
)
// Error: 出错了
//reject Error: 出错了
```
### Promise 对象的状态变化