Skip to content

Commit c4411ad

Browse files
committed
Checkbox default onclick handling
1 parent 621e1f8 commit c4411ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

views/Checkbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {mergeAttributes} from "../common";
1010
export default class Checkbox {
1111
view({attrs}) {
1212
return m('input[type=checkbox]', mergeAttributes({}, attrs, {
13-
onclick: () => attrs.onclick(!attrs.checked)
13+
onclick: () => (attrs.onclick || (_ => _))(!attrs.checked)
1414
}))
1515
}
1616
}

0 commit comments

Comments
 (0)