mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-28 21:32:20 +00:00
fix section Promise.reject() bug
‘出错了’和‘foo’两个字符串搞混了
This commit is contained in:
parent
91d44bdb6f
commit
38d393f4e2
@ -532,7 +532,7 @@ p.then(function () {
|
||||
```javascript
|
||||
var p = Promise.reject('出错了');
|
||||
// 等同于
|
||||
var p = new Promise((resolve, reject) => reject('foo'))
|
||||
var p = new Promise((resolve, reject) => reject('出错了'))
|
||||
|
||||
p.then(null, function (s){
|
||||
console.log(s)
|
||||
|
Loading…
x
Reference in New Issue
Block a user