提交 5bb4ac2e 编写于 作者: E Erich Gamma

Optimize the case when there are no emmet preferences

上级 5836a911
......@@ -43,8 +43,10 @@ export abstract class EmmetEditorAction extends EditorAction {
}
}
let syntaxProfile = this.configurationService.getConfiguration<IEmmetConfiguration>().emmet.syntaxProfiles;
_module.profile.reset();
_module.loadProfiles(syntaxProfile);
if (Object.keys(syntaxProfile).length !== 0) {
_module.profile.reset();
_module.loadProfiles(syntaxProfile);
}
}
private resetEmmetPreferences(_module: any) {
......@@ -69,10 +71,10 @@ export abstract class EmmetEditorAction extends EditorAction {
}
this.updateEmmetPreferences(_module);
this.runEmmetAction(_module);
this.resetEmmetPreferences(_module);
} catch (err) {
//
} finally {
this.resetEmmetPreferences(_module);
}
}, e);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册