diff options
author | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-09-05 17:59:28 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-05 17:59:28 +0530 |
commit | c40e50274ec326d29d3373fa3b346b1f29cf8b95 (patch) | |
tree | 1a652c89551c2120eec57c2d7e7e19bd3c86ed83 /src/webview/spellchecker.ts | |
parent | docs: Updated CHANGELOG.md [skip ci] (diff) | |
download | ferdium-app-c40e50274ec326d29d3373fa3b346b1f29cf8b95.tar.gz ferdium-app-c40e50274ec326d29d3373fa3b346b1f29cf8b95.tar.zst ferdium-app-c40e50274ec326d29d3373fa3b346b1f29cf8b95.zip |
Expose some functions to the recipe child processes (#1869)
* chore: expose some functions to the recipe child processes
so as to bypass the need for the recipe to require '@electron/remote'
Diffstat (limited to 'src/webview/spellchecker.ts')
-rw-r--r-- | src/webview/spellchecker.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/webview/spellchecker.ts b/src/webview/spellchecker.ts index aa9a2350f..30b4ef075 100644 --- a/src/webview/spellchecker.ts +++ b/src/webview/spellchecker.ts | |||
@@ -4,8 +4,8 @@ import { DEFAULT_APP_SETTINGS, isMac } from '../environment'; | |||
4 | 4 | ||
5 | const debug = require('debug')('Ferdi:spellchecker'); | 5 | const debug = require('debug')('Ferdi:spellchecker'); |
6 | 6 | ||
7 | const webContents = getCurrentWebContents(); | 7 | const { session } = getCurrentWebContents(); |
8 | const [defaultLocale] = webContents.session.getSpellCheckerLanguages(); | 8 | const [defaultLocale] = session.getSpellCheckerLanguages(); |
9 | debug('Spellchecker default locale is', defaultLocale); | 9 | debug('Spellchecker default locale is', defaultLocale); |
10 | 10 | ||
11 | export function getSpellcheckerLocaleByFuzzyIdentifier(identifier: string) { | 11 | export function getSpellcheckerLocaleByFuzzyIdentifier(identifier: string) { |
@@ -31,5 +31,5 @@ export function switchDict(locale: string) { | |||
31 | 31 | ||
32 | locales.push(defaultLocale, DEFAULT_APP_SETTINGS.fallbackLocale); | 32 | locales.push(defaultLocale, DEFAULT_APP_SETTINGS.fallbackLocale); |
33 | 33 | ||
34 | webContents.session.setSpellCheckerLanguages(locales); | 34 | session.setSpellCheckerLanguages(locales); |
35 | } | 35 | } |