We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 609054e commit 9c4bf35Copy full SHA for 9c4bf35
src/platforms/web/compiler/directives/model.js
@@ -52,8 +52,8 @@ function genCheckboxModel (el: ASTElement, value: ?string) {
52
'if(Array.isArray($$a)){' +
53
`var $$v=${valueBinding},` +
54
'$$i=$$a.indexOf($$v);' +
55
- 'if($$c){$$i<0&&$$a.push($$v)}' +
56
- 'else{$$i>-1&&$$a.splice($$i,1)}' +
+ `if($$c){$$i<0&&(${value}=$$a.concat($$v))}` +
+ `else{$$i>-1&&(${value}=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}` +
57
`}else{${value}=$$c}`
58
)
59
}
0 commit comments