提交 e1325259 编写于 作者: R Ramya Achutha Rao

Add null check before updating extensionsPath for emmet

上级 0d765310
......@@ -121,13 +121,16 @@ export function activate(context: vscode.ExtensionContext) {
let extensionsPath = vscode.workspace.getConfiguration('emmet')['extensionsPath'];
if (!path.isAbsolute(extensionsPath)) {
extensionsPath = path.join(vscode.workspace.rootPath, extensionsPath);
if (extensionsPath) {
if (!path.isAbsolute(extensionsPath)) {
extensionsPath = path.join(vscode.workspace.rootPath, extensionsPath);
}
updateExtensionsPath(extensionsPath);
}
updateExtensionsPath(extensionsPath);
context.subscriptions.push(vscode.workspace.onDidChangeConfiguration(() => {
let newExtensionsPath = vscode.workspace.getConfiguration('emmet')['extensionsPath'];
if (!path.isAbsolute(newExtensionsPath)) {
if (newExtensionsPath && !path.isAbsolute(newExtensionsPath)) {
newExtensionsPath = path.join(vscode.workspace.rootPath, newExtensionsPath);
}
if (extensionsPath !== newExtensionsPath) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册