diff --git a/src/commandsAndMenu.tsx b/src/commandsAndMenu.tsx index 4e83a469..3779a6cc 100644 --- a/src/commandsAndMenu.tsx +++ b/src/commandsAndMenu.tsx @@ -1276,7 +1276,7 @@ export function addCommands( ), execute: async args => { const { files } = args as any as CommandArguments.IGitFileDiff; - if (!gitModel.pathRepository) { + if (gitModel.pathRepository === null) { return; } diff --git a/src/model.ts b/src/model.ts index 64f50cc2..4e135cd3 100644 --- a/src/model.ts +++ b/src/model.ts @@ -360,7 +360,7 @@ export class GitExtension implements IGitExtension { * Note: This makes sure it always returns non null value */ protected get _currentMarker(): BranchMarker { - if (!this.pathRepository) { + if (this.pathRepository === null) { return new BranchMarker(() => {}); }