提交 39d401c0 编写于 作者: M Matt Bierner

Use for/of and prefer mutating expr over using concat

上级 d881556c
......@@ -595,16 +595,15 @@ export class ContextKeyAndExpr implements ContextKeyExpr {
}
private static _normalizeArr(arr: Array<ContextKeyExpr | null | undefined>): ContextKeyExpr[] {
let expr: ContextKeyExpr[] = [];
const expr: ContextKeyExpr[] = [];
for (let i = 0, len = arr.length; i < len; i++) {
let e: ContextKeyExpr | null | undefined = arr[i];
for (const e of arr) {
if (!e) {
continue;
}
if (e instanceof ContextKeyAndExpr) {
expr = expr.concat(e.expr);
expr.push(...e.expr);
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册