diff --git a/extension.js b/extension.js index 503c907..f38a78b 100644 --- a/extension.js +++ b/extension.js @@ -41,9 +41,7 @@ function activate(context) { vscode.window.onDidChangeActiveTextEditor( editor => { activeEditor = editor; - if (activeEditor) { - toggleMarkdownShortcuts(activeEditor.document.languageId); - } + toggleMarkdownShortcuts(activeEditor?.document.languageId); }, null, context.subscriptions