Skip to content

Commit

Permalink
Merge pull request #84017 from mjbvz/remove-_primitiveArrayEquals
Browse files Browse the repository at this point in the history
Reapply using array.isEquals instead of _primitiveArrayEquals
  • Loading branch information
alexdima authored Nov 6, 2019
2 parents 7b9217c + 67e4831 commit 6d39826
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/vs/editor/common/config/commonEditorConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,18 +342,6 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed
return EditorConfiguration2.computeOptions(this._validatedOptions, env);
}

private static _primitiveArrayEquals(a: any[], b: any[]): boolean {
if (a.length !== b.length) {
return false;
}
for (let i = 0; i < a.length; i++) {
if (a[i] !== b[i]) {
return false;
}
}
return true;
}

private static _subsetEquals(base: { [key: string]: any }, subset: { [key: string]: any }): boolean {
for (const key in subset) {
if (hasOwnProperty.call(subset, key)) {
Expand All @@ -364,7 +352,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed
continue;
}
if (Array.isArray(baseValue) && Array.isArray(subsetValue)) {
if (!this._primitiveArrayEquals(baseValue, subsetValue)) {
if (!arrays.equals(baseValue, subsetValue)) {
return false;
}
continue;
Expand Down

0 comments on commit 6d39826

Please sign in to comment.