Skip to content

Commit 6aff7a8

Browse files
committed
Don't ignore rejected promises
1 parent 0a3931c commit 6aff7a8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README-zh-CN.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,11 +2026,13 @@ try {
20262026
}
20272027
```
20282028

2029-
### Don't ignore rejected promises
2029+
### 不要忽略被拒绝的 promise
20302030
For the same reason you shouldn't ignore caught errors
20312031
from `try/catch`.
20322032

2033-
**Bad:**
2033+
与你不应忽略来自 `try/catch` 的错误的原因相同。
2034+
2035+
**不好的:**
20342036
```javascript
20352037
getdata()
20362038
.then((data) => {
@@ -2041,7 +2043,7 @@ getdata()
20412043
});
20422044
```
20432045

2044-
**Good:**
2046+
**好的:**
20452047
```javascript
20462048
getdata()
20472049
.then((data) => {

0 commit comments

Comments
 (0)