Skip to content

Commit

Permalink
zip-node bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
faluelv committed Oct 25, 2016
1 parent 999dd64 commit 91e947b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zip-node.js
Expand Up @@ -95,7 +95,7 @@ Unzip.prototype.getBuffer = function (whatYouNeed, options, callback) {
finishedNumber++;
}

if ((finishedNumber >= whatYouNeed.length && !isMutiple) || (isMutiple && currentIndex >= entryCount)) {
if (finishedNumber >= whatYouNeed.length && !isMutiple) {
callback(null, output, entryCount);
} else {
next();
Expand All @@ -108,7 +108,7 @@ Unzip.prototype.getBuffer = function (whatYouNeed, options, callback) {
if (!findIt) next();

}, function () {
if (finishedNumber < whatYouNeed.length) {
if ((finishedNumber < whatYouNeed.length) || (isMutiple && currentIndex >= entryCount)) {
callback(null, output, entryCount);
}
});
Expand Down

0 comments on commit 91e947b

Please sign in to comment.