Skip to content

Commit

Permalink
fix checkbox add on missclick
Browse files Browse the repository at this point in the history
  • Loading branch information
omohokcoj committed May 5, 2024
1 parent a0f4916 commit 6d93116
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/template_builder/builder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ export default {
type = this.fieldTypes[0]
}
if (type === 'checkbox' && !this.drawFieldType) {
if (type === 'checkbox' && !this.drawFieldType && (this.template.fields[this.template.fields.length - 1]?.type === 'checkbox' || area.w)) {
const previousField = [...this.template.fields].reverse().find((f) => f.type === type)
const previousArea = previousField?.areas?.[previousField.areas.length - 1]
Expand Down

0 comments on commit 6d93116

Please sign in to comment.