Skip to content

Commit

Permalink
fix: es6 promise log => error
Browse files Browse the repository at this point in the history
  • Loading branch information
loongzhu committed Oct 28, 2023
1 parent 9c3d366 commit 079af87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions category/es6/promise.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ const someAsyncThing = () => {
resolve(x + 2);
} catch (e) {
resolve(e);
console.log(e)
console.error(e)
}
});
};
Expand All @@ -516,11 +516,11 @@ const p3 = new Promise((resolve, reject) => {

Promise.all([p1, p2])
.then((result) => console.log(result))
.catch((e) => console.log(e));
.catch((e) => console.error(e));

Promise.all([p1, p3])
.then((result) => console.log(result))
.catch((e) => console.log(e));
.catch((e) => console.error(e));

const promises = [
new Promise((resolve, reject) => {
Expand Down

0 comments on commit 079af87

Please sign in to comment.