mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
model can be null (for #12884)
This commit is contained in:
@@ -74,7 +74,8 @@ class OpenInDiffAction extends baseeditor.EditorInputAction {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(typeof this.gitService.getModel().getRepositoryRoot() === 'string')) {
|
||||
const model = this.gitService.getModel();
|
||||
if (!model || !(typeof model.getRepositoryRoot() === 'string')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -165,7 +166,8 @@ class OpenInEditorAction extends baseeditor.EditorInputAction {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(typeof this.gitService.getModel().getRepositoryRoot() === 'string')) {
|
||||
const model = this.gitService.getModel();
|
||||
if (!model || !(typeof model.getRepositoryRoot() === 'string')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user