Skip to content

Commit 746e17a

Browse files
committed
only sync inline value on init for checkbox/radio (fix #1985)
1 parent 5496497 commit 746e17a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/directives/public/model/checkbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default {
4747
}
4848

4949
this.on('change', this.listener)
50-
if (el.checked) {
50+
if (el.hasAttribute('checked')) {
5151
this.afterBind = this.listener
5252
}
5353
},

src/directives/public/model/radio.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default {
2323
}
2424
this.on('change', this.listener)
2525

26-
if (el.checked) {
26+
if (el.hasAttribute('checked')) {
2727
this.afterBind = this.listener
2828
}
2929
},

0 commit comments

Comments
 (0)