diff options
Diffstat (limited to 'src/webview/contextMenu.js')
-rw-r--r-- | src/webview/contextMenu.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/webview/contextMenu.js b/src/webview/contextMenu.js index a4a6ab899..967e8e667 100644 --- a/src/webview/contextMenu.js +++ b/src/webview/contextMenu.js | |||
@@ -280,12 +280,13 @@ const buildMenuTpl = (props, suggestions, isSpellcheckEnabled, defaultSpellcheck | |||
280 | }; | 280 | }; |
281 | 281 | ||
282 | export default function contextMenu(spellcheckProvider, isSpellcheckEnabled, getDefaultSpellcheckerLanguage, getSpellcheckerLanguage) { | 282 | export default function contextMenu(spellcheckProvider, isSpellcheckEnabled, getDefaultSpellcheckerLanguage, getSpellcheckerLanguage) { |
283 | webContents.on('context-menu', (e, props) => { | 283 | webContents.on('context-menu', async (e, props) => { |
284 | e.preventDefault(); | 284 | e.preventDefault(); |
285 | 285 | ||
286 | let suggestions = []; | 286 | let suggestions = []; |
287 | if (spellcheckProvider && props.misspelledWord) { | 287 | if (spellcheckProvider && props.misspelledWord) { |
288 | suggestions = spellcheckProvider.getSuggestion(props.misspelledWord); | 288 | debug('Mispelled word', props.misspelledWord); |
289 | suggestions = await spellcheckProvider.getSuggestion(props.misspelledWord); | ||
289 | 290 | ||
290 | debug('Suggestions', suggestions); | 291 | debug('Suggestions', suggestions); |
291 | } | 292 | } |