Try cactch control edited

This commit is contained in:
Burak Civan 2021-05-31 18:46:16 +03:00
parent 81852f00fa
commit 8808d326ce
2 changed files with 16 additions and 2 deletions

View File

@ -318,9 +318,16 @@ export default {
this.selected = this.value;
if (this.model.length) {
if (this.model !== undefined) {
try {
if (eval(this.model) !== undefined) {
this.selected = eval(this.model);
} else {
this.selected = this.model;
}
} catch (e) {
this.selected = this.model;
}
}
if (this.multiple && !this.selected.length) {

View File

@ -430,9 +430,16 @@ export default {
this.selected = this.value;
if (this.model.length) {
if (this.model !== undefined) {
try {
if (eval(this.model) !== undefined) {
this.selected = eval(this.model);
} else {
this.selected = this.model;
}
} catch (e) {
this.selected = this.model;
}
}
if (this.multiple && !this.selected.length) {