Skip to content

Commit bc161f1

Browse files
Merge pull request #150 from lionel-bijaoui/lb_fix_checklist_value_not_Array
Fix a problem with value define but not an Array
2 parents 7deb30d + 190f67a commit bc161f1

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)