about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorGrégoire Geis <git@gregoirege.is>2020-02-04 01:44:12 +0100
committerGitHub <noreply@github.com>2020-02-04 01:44:12 +0100
commit875dc6d1a4973f70cd48b797ae755d1bd7a83fa5 (patch)
tree6ffb68a9a23ac219b99536514b84fb82cf0934c8 /editors/code/src
parent7fd661f0853ef3a32bfb8a01617de8e5adb3ca01 (diff)
downloadrust-875dc6d1a4973f70cd48b797ae755d1bd7a83fa5.tar.gz
rust-875dc6d1a4973f70cd48b797ae755d1bd7a83fa5.zip
Merge two if statements into one in editors/code/src/commands/on_enter.ts.
Co-Authored-By: Veetaha <veetaha2@gmail.com>
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/commands/on_enter.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/code/src/commands/on_enter.ts b/editors/code/src/commands/on_enter.ts
index ac582b42303..c636234dadb 100644
--- a/editors/code/src/commands/on_enter.ts
+++ b/editors/code/src/commands/on_enter.ts
@@ -8,7 +8,7 @@ async function handleKeypress(ctx: Ctx) {
     const editor = ctx.activeRustEditor;
     const client = ctx.client;
     if (!editor) return false;
-    if (!client) return false;
+    if (!editor || !client) return false;
 
     const request: lc.TextDocumentPositionParams = {
         textDocument: { uri: editor.document.uri.toString() },