Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -977,10 +977,10 @@ function combine(val1, val2) {
### Don't over-optimize

Modern browsers do a lot of optimization under-the-hood at runtime. A lot of
times, if you are optimizing then you are just wasting your time. [There are good
resources](https://github.com/petkaantonov/bluebird/wiki/Optimization-killers)
for seeing where optimization is lacking. Target those in the meantime, until
they are fixed if they can be.
times, if you are optimizing then you are just wasting your time. Focus on writing
clear and readable code first, and optimize only when you have identified real
performance issues.


**Bad:**

Expand Down Expand Up @@ -2047,17 +2047,16 @@ try {
For the same reason you shouldn't ignore caught errors
from `try/catch`.

**Bad:**

```javascript
**Good:**
getdata()
.then(data => {
functionThatMightThrow(data);
.then(user => {
return getOrders(user.id);
})
.catch(error => {
console.log(error);
console.error(error);
});
```


**Good:**

Expand Down