diff --git a/vscode/src/workspace.ts b/vscode/src/workspace.ts index cf85d6b3e..1adcc6db0 100644 --- a/vscode/src/workspace.ts +++ b/vscode/src/workspace.ts @@ -59,7 +59,10 @@ export class Workspace implements WorkspaceInterface { if (gitExtension) { const api = gitExtension.exports.getAPI(1); const repository = await api.openRepository(this.workspaceFolder.uri); - rootGitUri = repository.rootUri; + + if (repository) { + rootGitUri = repository.rootUri; + } } this.registerCreateDeleteWatcher(