arreglado fallo al actualizar el consignatario predeterminado

This commit is contained in:
Dani Herrero 2017-06-01 08:44:37 +02:00
parent dd9ec548e1
commit cf9e2f3d14
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ module.exports = function(Address) {
removeAllDefault(address.client);
next();
}
else if (address.default && !data.default)
else if (address.default && data.hasOwnProperty('default') && !data.default)
next(generateErrorDefaultAddress());
else
next();