-
-
Save saml/9a33deb9711385062ee4143ad3c676f8 to your computer and use it in GitHub Desktop.
This file contains 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 characters
async (next) => { | |
const x = await f1(); | |
if (x) { | |
return next(); | |
} | |
f2(() => { | |
f3(); | |
next(); | |
}); | |
// fails eslint consistent-return | |
} | |
async (next) => { | |
const x = await f1(); | |
if (x) { | |
return next(); | |
} | |
await new Promise((resolve) => { | |
f2(() => { | |
f3(); | |
resolve(); | |
}); | |
}); | |
return next(); // passes eslint | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment