提交 5ea145f1 编写于 作者: J Johannes Rieken

use Object.create(null)...

上级 e190b866
......@@ -506,7 +506,7 @@ export abstract class BaseEditorSimpleWorker {
return Promise.resolve({});
}
const wordDefRegExp = new RegExp(wordDef, wordDefFlags);
const result: { [word: string]: number[] } = {};
const result: { [word: string]: number[] } = Object.create(null);
for (let line = range.startLineNumber; line < range.endLineNumber; line++) {
let words = model.getLineWords(line, wordDefRegExp);
for (const word of words) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册