Skip to content
New issue

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

spell-check: Promise returned in function argument where a void return was expected. #352

Closed
manusa opened this issue Oct 12, 2023 · 2 comments · Fixed by #355
Closed

spell-check: Promise returned in function argument where a void return was expected. #352

manusa opened this issue Oct 12, 2023 · 2 comments · Fixed by #355
Assignees
Labels
good first issue Good for newcomers hacktoberfest Hacktoberfest help wanted Extra attention is needed
Milestone

Comments

@manusa
Copy link
Owner

manusa commented Oct 12, 2023

Description

The following code has been marked as a bug:

const spellCheckFunction = async (words, callback) => {
// eslint-disable-next-line no-undef
const misspelled = await ipcRenderer.invoke(APP_EVENTS.dictionaryGetMisspelled, words);
callback(misspelled);
};

It should be changed to:

const spellCheckFunction = (words, callback) => {
  // eslint-disable-next-line no-undef
  ipcRenderer.invoke(APP_EVENTS.dictionaryGetMisspelled, words)
    .then(misspelled => callback(misspelled));
};
@manusa manusa added help wanted Extra attention is needed good first issue Good for newcomers hacktoberfest Hacktoberfest labels Oct 12, 2023
@maazshakeel
Copy link
Contributor

@manusa Hey, I'd love to work on this issue, can you assign it to me?

@maazshakeel
Copy link
Contributor

Made a pull request:
#355 (comment)

Would appreciate the feedback! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants