Skip to content

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

Closed
@manusa

Description

@manusa

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));
};

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions