Skip to content

Commit

Permalink
fix(AddressEdit): choose overseas failure (youzan#4767)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeLaoyu authored and chenjiahan committed Oct 18, 2019
1 parent dc964ac commit b2f267b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/address-edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export default createComponent({
},

onAreaConfirm(values) {
values = values.filter(value => !!value);
if (values.some(value => !value.code)) {
Toast(t('areaEmpty'));
return;
Expand Down
5 changes: 4 additions & 1 deletion src/area/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ export default createComponent({

// parse output columns data
parseOutputValues(values) {
return values.map((value = {}, index) => {
return values.map((value, index) => {
// save undefined value
if (!value) return value;

value = JSON.parse(JSON.stringify(value));
if (!value.code || value.name === this.columnsPlaceholder[index]) {
value.code = '';
Expand Down

0 comments on commit b2f267b

Please sign in to comment.