Browse Source
* Update 2015-12-16-ismounted-antipattern.md In case anybody else stumbles across this old blog post, I wanted to submit a patch to help with unhandled rejections. `#then` and `#catch` each return new Promise instances, so here we actually create two new promises (that aren't assigned). If the argument promise to `#makeCancelable` rejects, the promise created by `#then` will be an unhandled rejection, which in Node 7 will be an uncaught error. By using the second argument of `#then` to handle rejections instead, we don't need to worry about the runtime finding any unhandled rejections here. * Style updates * Add update noticemain
Will Myers
8 years ago
committed by
Dan Abramov
1 changed files with 6 additions and 6 deletions
Loading…
Reference in new issue