Skip to content

Commit 190f67a

Browse files
author
Lionel Bijaoui
committed
Fix a problem with value define but not an Array
1 parent 7deb30d commit 190f67a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/fields/core/fieldChecklist.vue

+4-3
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@
6868
},
6969
7070
onChanged(event, item) {
71-
if (isNil(this.value))
71+
if (isNil(this.value) || !Array.isArray(this.value)){
7272
this.$set(this, "value", []);
73+
}
7374
74-
if (event.target.checked)
75+
if (event.target.checked) {
7576
this.value.push(this.getItemID(item));
76-
else {
77+
} else {
7778
this.value.splice(this.value.indexOf(this.getItemID(item)), 1);
7879
}
7980
},

0 commit comments

Comments
 (0)