Skip to content

Commit

Permalink
Merge pull request #42914 from Connormiha/optimize-context-key-change…
Browse files Browse the repository at this point in the history
…-event

Remove needless check for array in ContextKeyChangeEvent
  • Loading branch information
jrieken authored Feb 26, 2018
2 parents dbbfa5d + a75736e commit 43fbb43
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/vs/platform/contextkey/browser/contextKeyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,7 @@ export class ContextKeyChangeEvent implements IContextKeyChangeEvent {
private _keys: string[] = [];

collect(oneOrManyKeys: string | string[]): void {
if (Array.isArray(oneOrManyKeys)) {
this._keys = this._keys.concat(oneOrManyKeys);
} else {
this._keys.push(oneOrManyKeys);
}
this._keys = this._keys.concat(oneOrManyKeys);
}

affectsSome(keys: Set<string>): boolean {
Expand Down

0 comments on commit 43fbb43

Please sign in to comment.