mirror of
https://github.com/Microsoft/vscode
synced 2024-10-12 06:17:18 +00:00
be aware that 'asAbsolutePath' might be 'null', fixes #8793
This commit is contained in:
parent
82136bd865
commit
ed9e56b261
|
@ -55,16 +55,15 @@ export function create(client: ITypescriptServiceClient, isOpen:(path:string)=>P
|
|||
}));
|
||||
|
||||
function onEditor(editor: vscode.TextEditor): void {
|
||||
if (!editor || !vscode.languages.match(selector, editor.document)) {
|
||||
if (!editor
|
||||
|| !vscode.languages.match(selector, editor.document)
|
||||
|| !client.asAbsolutePath(editor.document.uri)) {
|
||||
|
||||
item.hide();
|
||||
return;
|
||||
}
|
||||
|
||||
const file = client.asAbsolutePath(editor.document.uri);
|
||||
if (!file) {
|
||||
return;
|
||||
}
|
||||
|
||||
isOpen(file).then(value => {
|
||||
if (!value) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue