From 88421c586d6d183fb5eb9c3b0d172d41f0aac5c8 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Tue, 3 Oct 2017 12:50:01 -0400 Subject: [PATCH] Fixes diffWith when called with no previous sha --- src/commands/diffWith.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/diffWith.ts b/src/commands/diffWith.ts index 64936c0..f57ad5c 100644 --- a/src/commands/diffWith.ts +++ b/src/commands/diffWith.ts @@ -48,7 +48,7 @@ export class DiffWithCommand extends ActiveEditorCommand { args = { repoPath: commit1.repoPath, lhs: { - sha: commit1.previousSha!, + sha: commit1.previousSha !== undefined ? commit1.previousSha : GitService.fakeSha, uri: commit1.previousUri! }, rhs: {