Skip to content

Commit

Permalink
fix: correct monospace state name
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny243 committed Jun 25, 2020
1 parent 72de951 commit ce40cc4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/assets/javascripts/views/editor/editor_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type EditorState = {
noteStatus?: NoteStatus
tagsAsStrings?: string
marginResizersEnabled?: boolean
monospaceEnabled?: boolean
monospaceFont?: boolean
isDesktop?: boolean
syncTakingTooLong: boolean
showExtensions: boolean
Expand Down Expand Up @@ -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
);
Expand All @@ -965,7 +965,7 @@ class EditorViewCtrl extends PureViewCtrl implements EditorViewScope {
true
);
await this.setEditorState({
monospaceEnabled,
monospaceFont,
spellcheck,
marginResizersEnabled
});
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit ce40cc4

Please sign in to comment.