I'm getting a consistent-return
ESLint error on the first line of the following code.
return new Promise((resolve, reject) => {
if (condition) {
asyncMethod.then(data => {
return resolve(syncMethod());
}, err => reject(err));
} else {
return resolve(syncMethod());
}
});
What is the the missing case where the return is not consistent and how should it be fixed?