fixed select component sorted options array issue ( 3938011299 )
This commit is contained in:
parent
3f29c17e43
commit
3d3fbda128
@ -893,12 +893,12 @@ export default {
|
|||||||
this.selected = [];
|
this.selected = [];
|
||||||
|
|
||||||
selected.forEach(function (select, index) {
|
selected.forEach(function (select, index) {
|
||||||
if (this.sorted_options.find((option) => option.key == select)) {
|
if (Array.isArray(this.sorted_options) && this.sorted_options.find((option) => option.key == select)) {
|
||||||
this.selected.push(select);
|
this.selected.push(select);
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
} else {
|
} else {
|
||||||
if (! options.find((option) => option == this.selected)) {
|
if (Array.isArray(options) && ! options.find((option) => option == this.selected)) {
|
||||||
this.selected = '';
|
this.selected = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1107,12 +1107,12 @@ export default {
|
|||||||
this.selected = [];
|
this.selected = [];
|
||||||
|
|
||||||
selected.forEach(function (select, index) {
|
selected.forEach(function (select, index) {
|
||||||
if (this.sorted_options.find((option) => option.key == select)) {
|
if (Array.isArray(this.sorted_options) && this.sorted_options.find((option) => option.key == select)) {
|
||||||
this.selected.push(select);
|
this.selected.push(select);
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
} else {
|
} else {
|
||||||
if (! options.find((option) => option == this.selected)) {
|
if (Array.isArray(options) && ! options.find((option) => option == this.selected)) {
|
||||||
this.selected = '';
|
this.selected = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user