use deduplicate

This commit is contained in:
Arthur Ozga
2017-02-14 11:30:19 -08:00
parent 21355982fd
commit 6c2c2f8f3f
2 changed files with 12 additions and 27 deletions

View File

@@ -1688,13 +1688,7 @@ namespace ts {
let allFixes: CodeAction[] = [];
// De-duplicate error codes.
const errorCodeSet: number[] = [];
for (const code of errorCodes) {
errorCodeSet[code] = code;
}
forEach(errorCodeSet, error => {
forEach(deduplicate(errorCodes), error => {
cancellationToken.throwIfCancellationRequested();
const context = {