From 5bf6d0cabc140b75ee27535c0089458431faa4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Wed, 11 Nov 2020 16:11:52 +0100 Subject: [PATCH] fixes #65188 --- extensions/git/src/commands.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 12c43c3540d..b5bede72cdd 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1109,6 +1109,10 @@ export class CommandCenter { @command('git.stageChange') async stageChange(uri: Uri, changes: LineChange[], index: number): Promise { + if (!uri) { + return; + } + const textEditor = window.visibleTextEditors.filter(e => e.document.uri.toString() === uri.toString())[0]; if (!textEditor) { @@ -1159,6 +1163,10 @@ export class CommandCenter { @command('git.revertChange') async revertChange(uri: Uri, changes: LineChange[], index: number): Promise { + if (!uri) { + return; + } + const textEditor = window.visibleTextEditors.filter(e => e.document.uri.toString() === uri.toString())[0]; if (!textEditor) { -- GitLab