From f5efbc41b31f253f23fcb05adca8e4b54b33e327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Collonval?= Date: Tue, 21 Nov 2023 15:10:23 +0100 Subject: [PATCH] Fix testing `pathRepository` for `null` (#1304) --- src/commandsAndMenu.tsx | 2 +- src/model.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(() => {}); }