Fixes issues with missing repoPath

Allows commit search without an active editor
This commit is contained in:
Eric Amodio
2017-05-22 16:04:46 -04:00
parent ec6ca8188c
commit 49fa9b5078
6 changed files with 18 additions and 13 deletions

View File

@@ -22,7 +22,7 @@ export class CloseUnchangedFilesCommand extends ActiveEditorCommand {
try {
if (args.uris === undefined) {
const repoPath = await this.git.getRepoPathFromUri(uri);
if (repoPath === undefined) return window.showWarningMessage(`Unable to close unchanged files`);
if (!repoPath) return window.showWarningMessage(`Unable to close unchanged files`);
const status = await this.git.getStatusForRepo(repoPath);
if (status === undefined) return window.showWarningMessage(`Unable to close unchanged files`);