提交 35704719 编写于 作者: P Peng Lyu

check null and undefined.

上级 0f04cff1
...@@ -104,12 +104,12 @@ export class UriString { ...@@ -104,12 +104,12 @@ export class UriString {
} }
toRepositoryUrl(owner: string = null): vscode.Uri { toRepositoryUrl(owner: string = null): vscode.Uri {
if (!this.isScpUri && (this.url === null || this.isFileUri)) { if (!this.isScpUri && (!this.url || this.isFileUri)) {
return this.url; return this.url;
} }
let scheme = 'https'; let scheme = 'https';
if (this.url !== null && (this.url.scheme === 'http' || this.url.scheme === 'https')) { if (this.url && (this.url.scheme === 'http' || this.url.scheme === 'https')) {
scheme = this.url.scheme; scheme = this.url.scheme;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册