Authored by zhangxiaoru

修改地址报错

... ... @@ -145,8 +145,7 @@ const addressModify = (req, res, next) => {
addressModel.getAddressData({uid: uid}).then(result => {
let userAddressList = result;
let addressData = addressProcess.getAddressByAreaCode(areaCode,
_.get(userAddressList, 'data', [])) || {};
let addressData = addressProcess.getAddressByAreaCode(areaCode, _.get(userAddressList, 'data', [])) || {};
Object.assign(addressData, {
orderCode: orderCode,
... ... @@ -154,7 +153,7 @@ const addressModify = (req, res, next) => {
if (provinceAreaCode) {
// 不允许修改省份,字符串拆分
let areaArray = addressData.area.split(' ');
let areaArray = addressData.area ? addressData.area.split(' ') : [];
let area = _.slice(areaArray, 1);
Object.assign(addressData, {
... ...