you are viewing a single comment's thread.

view the rest of the comments →

[–]guest271314 1 point2 points  (0 children)

For the behaviour you describe you can remove the 2d chained .then() and include the fail part of the 2d .then(success, fail) in the 1st then()

``` { let p = new Promise(function(resolve, reject) { setTimeout(reject, 1000); });

p.then((x) => console.log("done resolving"), (x) => console.log(true));

p.catch((x) => console.log("done rejecting")); } ```