Merge pull request #2184 from matiaspando/increaseCoverage
Increase coverage
This commit is contained in:
commit
aa8d6f4754
3 changed files with 211 additions and 7 deletions
|
|
@ -106,7 +106,10 @@ RateService.prototype.getHistoricRates = function(code, dates, cb) {
|
|||
}, function(err, res, body) {
|
||||
if (err || res.statusCode != 200 || !body) return cb(err || res);
|
||||
if (!_.isArray(body)) {
|
||||
body = [{ ts: dates[0], rate: body.rate }];
|
||||
body = [{
|
||||
ts: dates[0],
|
||||
rate: body.rate
|
||||
}];
|
||||
}
|
||||
return cb(null, body);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue