mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
Fix JSCodeHint tests so they pass when running all tests.
One of the promises the code hinter was waiting for internally was never being resolved because the directory it was looking for didn't exist. Now resolve the promise even when the director doesn't exist so we don't just hang.
This commit is contained in:
1 parent
29bb4dfe19
commit
b017d7f1d5
1 file changed
+4
-3
@@ -232,7 +232,7 @@ define(function (require, exports, module) {
|
||||
* @param {function(Array.<string>)} successCallback - callback with
|
||||
* array of file path names.
|
||||
*/
|
||||
function getFilesInDirectory(dir, successCallback) {
|
||||
function getFilesInDirectory(dir, successCallback, errorCallback) {
|
||||
var files = []; // file names without paths.
|
||||
|
||||
/**
|
||||
@@ -250,8 +250,7 @@ define(function (require, exports, module) {
|
||||
function fileCallback(path) {
|
||||
files.push(path);
|
||||
}
|
||||
|
||||
forEachFileInDirectory(dir, doneCallback, fileCallback);
|
||||
forEachFileInDirectory(dir, doneCallback, fileCallback, null, errorCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -781,6 +780,8 @@ define(function (require, exports, module) {
|
||||
addFilesDeferred.resolveWith(null, [_ternWorker]);
|
||||
}
|
||||
|
||||
}, function () {
|
||||
addFilesDeferred.resolveWith(null);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user