From 875dc6d1a4973f70cd48b797ae755d1bd7a83fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Geis?= Date: Tue, 4 Feb 2020 01:44:12 +0100 Subject: Merge two if statements into one in editors/code/src/commands/on_enter.ts. Co-Authored-By: Veetaha --- editors/code/src/commands/on_enter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editors/code/src') diff --git a/editors/code/src/commands/on_enter.ts b/editors/code/src/commands/on_enter.ts index ac582b423..c636234da 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() }, -- cgit v1.2.3