From ce40cc4ba17a01166413e907db5b65913c233c45 Mon Sep 17 00:00:00 2001 From: Johnny Almonte Date: Thu, 25 Jun 2020 11:07:44 -0400 Subject: [PATCH] fix: correct monospace state name --- app/assets/javascripts/views/editor/editor_view.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/views/editor/editor_view.ts b/app/assets/javascripts/views/editor/editor_view.ts index 0482a7a6a..fec38617d 100644 --- a/app/assets/javascripts/views/editor/editor_view.ts +++ b/app/assets/javascripts/views/editor/editor_view.ts @@ -65,7 +65,7 @@ type EditorState = { noteStatus?: NoteStatus tagsAsStrings?: string marginResizersEnabled?: boolean - monospaceEnabled?: boolean + monospaceFont?: boolean isDesktop?: boolean syncTakingTooLong: boolean showExtensions: boolean @@ -952,7 +952,7 @@ class EditorViewCtrl extends PureViewCtrl implements EditorViewScope { } async reloadPreferences() { - const monospaceEnabled = this.application.getPrefsService().getValue( + const monospaceFont = this.application.getPrefsService().getValue( WebPrefKey.EditorMonospaceEnabled, true ); @@ -965,7 +965,7 @@ class EditorViewCtrl extends PureViewCtrl implements EditorViewScope { true ); await this.setEditorState({ - monospaceEnabled, + monospaceFont, spellcheck, marginResizersEnabled }); @@ -1008,7 +1008,7 @@ class EditorViewCtrl extends PureViewCtrl implements EditorViewScope { if (!editor) { return; } - if (this.getState().monospaceEnabled) { + if (this.getState().monospaceFont) { if (this.getState().isDesktop) { editor.style.fontFamily = Fonts.DesktopMonospaceFamily; } else {