Add sortBeforeComparison option back to arrayIsEqualTo

This commit is contained in:
zhengbli
2015-10-16 12:00:31 -07:00
parent ea9bf7313a
commit e7e1fa72ec
3 changed files with 14 additions and 8 deletions

View File

@@ -576,7 +576,8 @@ namespace ts.server {
let newRootFiles = projectOptions.files.map((f => this.getCanonicalFileName(f)));
let currentRootFiles = project.getRootFiles().map((f => this.getCanonicalFileName(f)));
if (!arrayIsEqualTo(currentRootFiles.sort(), newRootFiles.sort())) {
// We check if the project file list has changed. If so, we update the project.
if (!arrayIsEqualTo(currentRootFiles, newRootFiles, /*equaler*/ undefined, /*sortBeforeComparison*/ true)) {
// For configured projects, the change is made outside the tsconfig file, and
// it is not likely to affect the project for other files opened by the client. We can
// just update the current project.