Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
Remove platform-checking redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
arielsvg committed Mar 23, 2020
1 parent 7086aa7 commit 7429fcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/javascripts/main/spellcheckerManager.ts
@@ -1,5 +1,6 @@
import buildEditorContextMenu from 'electron-editor-context-menu';
import { Store, StoreKeys } from './store';
import { isMac } from './platforms';

function log(...message: any) {
console.log('spellcheckerMaager:', ...message);
Expand Down Expand Up @@ -42,8 +43,7 @@ export function createSpellcheckerManager(
* On MacOS the system spellchecker is used and every related Electron method
* is a no-op. Return early to prevent unnecessary code execution/allocations
*/
/** TODO(baptiste): precompute `process.platform` at compile-time */
if (process.platform === 'darwin') return null;
if (isMac) return null;

const session = webContents.session;

Expand Down

0 comments on commit 7429fcc

Please sign in to comment.