Categories
JavaScript Answers

How to fix Intellij Idea warning – “Promise returned is ignored” with async/await with JavaScript?

Spread the love

To fix Intellij Idea warning – "Promise returned is ignored" with async/await with JavaScript, we should make sure we run the promise.

For instance, we write

await userController.login(req, res);

to call the userController.login method that returns a promise.

And then we use await to run the promise and wait for it to finish.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *