Enables typescript strict mode

Fixes all the compile/lint issues
This commit is contained in:
Eric Amodio
2017-05-11 02:14:58 -04:00
parent 90245b1111
commit ee29596d45
52 changed files with 525 additions and 461 deletions

View File

@@ -43,7 +43,7 @@ export class GitUri extends Uri {
const commit = commitOrRepoPath;
base._fsPath = path.resolve(commit.repoPath, commit.originalFileName || commit.fileName);
if (!GitService.isUncommitted(commit.sha)) {
if (commit.sha !== undefined && !GitService.isUncommitted(commit.sha)) {
this.sha = commit.sha;
this.repoPath = commit.repoPath;
}
@@ -72,7 +72,7 @@ export class GitUri extends Uri {
}
getRelativePath(): string {
return GitService.normalizePath(path.relative(this.repoPath, this.fsPath));
return GitService.normalizePath(path.relative(this.repoPath || '', this.fsPath));
}
static async fromUri(uri: Uri, git: GitService) {