Skip to content

Commit f5efbc4

Browse files
authored
Fix testing pathRepository for null (#1304)
1 parent f2fbb69 commit f5efbc4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/commandsAndMenu.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ export function addCommands(
12761276
),
12771277
execute: async args => {
12781278
const { files } = args as any as CommandArguments.IGitFileDiff;
1279-
if (!gitModel.pathRepository) {
1279+
if (gitModel.pathRepository === null) {
12801280
return;
12811281
}
12821282

src/model.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ export class GitExtension implements IGitExtension {
360360
* Note: This makes sure it always returns non null value
361361
*/
362362
protected get _currentMarker(): BranchMarker {
363-
if (!this.pathRepository) {
363+
if (this.pathRepository === null) {
364364
return new BranchMarker(() => {});
365365
}
366366

0 commit comments

Comments
 (0)