Fix #64993
This commit is contained in:
parent
0f5b2d14e7
commit
9b5795b0fe
1 changed files with 13 additions and 5 deletions
|
@ -52,11 +52,19 @@ export function activate(context: ExtensionContext) {
|
|||
let tagPaths: string[] = workspace.getConfiguration('html').get('experimental.custom.tags', []);
|
||||
let attributePaths: string[] = workspace.getConfiguration('html').get('experimental.custom.attributes', []);
|
||||
|
||||
if (tagPaths) {
|
||||
const workspaceRoot = workspace.workspaceFolders![0].uri.fsPath;
|
||||
tagPaths = tagPaths.map(d => {
|
||||
return path.resolve(workspaceRoot, d);
|
||||
});
|
||||
if (tagPaths && tagPaths.length > 0) {
|
||||
if (!workspace.workspaceFolders) {
|
||||
tagPaths = [];
|
||||
} else {
|
||||
try {
|
||||
const workspaceRoot = workspace.workspaceFolders[0].uri.fsPath;
|
||||
tagPaths = tagPaths.map(d => {
|
||||
return path.resolve(workspaceRoot, d);
|
||||
});
|
||||
} catch (err) {
|
||||
tagPaths = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Options to control the language client
|
||||
|
|
Loading…
Reference in a new issue