0
Fork 0
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:
Hannah Wolfe 2013-06-15 08:48:51 -07:00
commit b816225dca

View file

@ -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,