mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Error check and default set for require-tree.
This commit is contained in:
parent
057791893f
commit
b4b8be2bb8
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…
Add table
Reference in a new issue