From 24044b3bf752b3e1a5244c48414e101bb924b7aa Mon Sep 17 00:00:00 2001 From: Erez Shermer Date: Wed, 20 Oct 2021 13:26:59 +0300 Subject: [PATCH] Fix to an error displayed on the console --- README.md | 3 +++ main.ts | 3 ++- manifest.json | 2 +- package.json | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c6cc4aa..08f9fa5 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,9 @@ Relative line numbers work very nicely with [this](https://github.com/nadavspi/o ## Changelog +### 0.4.4 +- Fix to an error constantly displayed in the console. + ### 0.4.3 - Another fix to "fixed keyboard layout in Normal mode". - Added escape character backslash to surround command. diff --git a/main.ts b/main.ts index f2e7716..215d9fc 100644 --- a/main.ts +++ b/main.ts @@ -85,7 +85,8 @@ export default class VimrcPlugin extends Plugin { this.app.workspace.on('codemirror', (cm: CodeMirror.Editor) => { cm.on('vim-mode-change', (modeObj: any) => { - this.logVimModeChange(modeObj); + if (modeObj) + this.logVimModeChange(modeObj); }); this.defineFixedLayout(cm); }); diff --git a/manifest.json b/manifest.json index afc0890..eabfaf8 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-vimrc-support", "name": "Vimrc Support", - "version": "0.4.3", + "version": "0.4.4", "description": "Auto-load a startup file with Obsidian Vim commands.", "author": "esm", "authorUrl": "", diff --git a/package.json b/package.json index c007365..b662194 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-vimrc-support", - "version": "0.4.3", + "version": "0.4.4", "description": "Auto-load a startup file with Obsidian Vim commands.", "main": "main.js", "scripts": {