未验证 提交 cbc3ba90 编写于 作者: A Alex Dima

Avoid using Map.keys()

上级 186354f5
......@@ -275,11 +275,12 @@ export class LanguageConfigurationRegistryImpl {
}
public getWordDefinitions(): [LanguageId, RegExp][] {
const languages = this._entries.keys();
let result: [LanguageId, RegExp][] = [];
for (const language of languages) {
result.push([language, this._entries.get(language)!.wordDefinition]);
}
this._entries.forEach((value, language) => {
if (value) {
result.push([language, value.wordDefinition]);
}
});
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册