Skip to content

Commit

Permalink
Fixed promise not resolved (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
Odd Marthon Lende authored and evertonfraga committed Dec 3, 2018
1 parent 658e96e commit 9e706c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/swarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ module.exports = function (_ref) {
return reject(data);
}

return data;
return resolve(data);
});
}).catch(function (e) {
return n > 0 && attempt(n - 1);
Expand Down Expand Up @@ -670,4 +670,4 @@ module.exports = function (_ref) {
fromString: fromString,
toString: toString
};
};
};
2 changes: 1 addition & 1 deletion src/swarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ module.exports = ({
if (data.indexOf("error") !== -1) {
return reject(data);
}
return data;
return resolve(data);
});
}).catch(e => n > 0 && attempt(n-1));
};
Expand Down

0 comments on commit 9e706c9

Please sign in to comment.