Created
December 14, 2017 17:59
-
-
Save maxkorp/73aa92ba0d1fc7bd0d32f1c2248fd5c4 to your computer and use it in GitHub Desktop.
Revisions
-
maxkorp created this gist
Dec 14, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ export async function doStuff(input) { try { const otherstuff = await doOtherStuff(input); return doDifferentStuff(otherstuff); } catch (e) { //handle } } export async function doStuff2(input) { return Promise.resolve() .then(() => { const otherstuff = await doOtherStuff(input); return doDifferentStuff(otherstuff); }) .catch((e) => { //handle }); }