Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit aee91c6

Browse files
committed
Merge pull request #7371 from adobe/dangoor/7250-jslint-flashing
Only kick off project pref loading when the project changes
2 parents 84060d7 + 7500b7d commit aee91c6

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/preferences/PreferencesManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ define(function (require, exports, module) {
240240
if (!filename || !projectDirectory) {
241241
return false;
242242
}
243-
return FileUtils.getRelativeFilename(projectDirectory, filename) ? true : false;
243+
return FileUtils.getRelativeFilename(projectDirectory, filename) !== undefined;
244244
}
245245

246246
/**

src/project/ProjectManager.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,10 +1142,14 @@ define(function (require, exports, module) {
11421142
var rootEntry = FileSystem.getDirectoryForPath(rootPath);
11431143
rootEntry.exists(function (err, exists) {
11441144
if (exists) {
1145-
PreferencesManager._setCurrentEditingFile(rootPath);
11461145
var projectRootChanged = (!_projectRoot || !rootEntry) ||
11471146
_projectRoot.fullPath !== rootEntry.fullPath;
11481147
var i;
1148+
1149+
if (projectRootChanged) {
1150+
PreferencesManager._setCurrentEditingFile(rootPath);
1151+
}
1152+
11491153

11501154
// Success!
11511155
var perfTimerName = PerfUtils.markStart("Load Project: " + rootPath);

0 commit comments

Comments
 (0)