提交 890d835b 编写于 作者: J Joao Moreno

npe

fixes #2100
上级 5f7226b8
......@@ -409,12 +409,12 @@ export class ChangesView extends EventEmitter.EventEmitter implements GitView.IV
const resource = fileInput.getResource();
const workspaceRoot = this.contextService.getWorkspace().resource.fsPath;
if (!paths.isEqualOrParent(resource.fsPath, workspaceRoot)) {
if (!workspaceRoot || !paths.isEqualOrParent(resource.fsPath, workspaceRoot)) {
return null; // out of workspace not yet supported
}
const repositoryRoot = this.gitService.getModel().getRepositoryRoot();
if (!paths.isEqualOrParent(resource.fsPath, repositoryRoot)) {
if (!repositoryRoot || !paths.isEqualOrParent(resource.fsPath, repositoryRoot)) {
return null; // out of repository not supported
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册