fix data. handling

This commit is contained in:
Matias Alejo Garcia 2017-11-13 11:32:07 -03:00
parent 136755fcda
commit 72827b12a6

View File

@ -37,13 +37,14 @@ AddressController.prototype.show = function(req, res) {
}
this._address.getAddressSummary(req.addr, options, function(err, data) {
if (data.addrStr)
data.addrStr = self.common.translateOutputAddress(data.addrStr);
if(err) {
return self.common.handleErrors(err, res);
}
if (data && data.addrStr)
data.addrStr = self.common.translateOutputAddress(data.addrStr);
res.jsonp(data);
});
};