mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Merge pull request #159 from jgable/fixRequireTree
Error check and default set for require-tree.
This commit is contained in:
commit
b816225dca
1 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,12 @@
|
|||
treePromise = treeDeferred.promise;
|
||||
|
||||
fs.readdir(dir, function (error, files) {
|
||||
if (error) {
|
||||
return treeDeferred.reject(error);
|
||||
}
|
||||
|
||||
files = files || [];
|
||||
|
||||
files.forEach(function (file) {
|
||||
var fileDeferred = when.defer(),
|
||||
filePromise = fileDeferred.promise,
|
||||
|
|
Loading…
Reference in a new issue