diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-02-13 08:09:28 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-02-13 08:09:28 +0100 |
commit | b0fd2a67ea586e59f4c8370acc9c093e44d7f3bd (patch) | |
tree | a790813b647c8ae93324232e5a1105d7cde7e891 /lib/utils/batch.js | |
parent | 7c8386986919f611dcdaaf917bf0c24fabcfe3a4 (diff) | |
download | gitbook-b0fd2a67ea586e59f4c8370acc9c093e44d7f3bd.zip gitbook-b0fd2a67ea586e59f4c8370acc9c093e44d7f3bd.tar.gz gitbook-b0fd2a67ea586e59f4c8370acc9c093e44d7f3bd.tar.bz2 |
Fix test with post in blocks
Diffstat (limited to 'lib/utils/batch.js')
-rw-r--r-- | lib/utils/batch.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/utils/batch.js b/lib/utils/batch.js index 5b92be5..bd3b80f 100644 --- a/lib/utils/batch.js +++ b/lib/utils/batch.js @@ -3,6 +3,7 @@ var _ = require("lodash"); // Execute a method for all element function execEach(items, options) { + if (_.size(items) == 0) return Q(); var concurrents = 0, d = Q.defer(), pending = []; options = _.defaults(options || {}, { |