We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why do I get this error? Can someone please help me?
"Expected to return a value at the end of async arrow function consistent-return."
I use it on an onChange since I would like the URL put in the input to be used.
const handleChange = async (event) => { try { const article = await extract(event.target.value) return article } catch (err) { console.trace(err) } }
The text was updated successfully, but these errors were encountered:
@niamao it seems your handler only returns value in the case everything work well, and returns nothing when there is error occurs. Try this:
const handleChange = async (event) => { try { const article = await extract(event.target.value) return article } catch (err) { console.trace(err) } return null; }
Sorry, something went wrong.
No branches or pull requests
Why do I get this error? Can someone please help me?
"Expected to return a value at the end of async arrow function consistent-return."
I use it on an onChange since I would like the URL put in the input to be used.
const handleChange = async (event) => {
try {
const article = await extract(event.target.value)
return article
} catch (err) {
console.trace(err)
}
}
The text was updated successfully, but these errors were encountered: