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 7f7bf91 commit d333a49Copy full SHA for d333a49
src/compiler/directives/model.js
@@ -41,10 +41,7 @@ export function genAssignmentCode (
41
if (modelRs.idx === null) {
42
return `${value}=${assignment}`
43
} else {
44
- return `var $$exp = ${modelRs.exp}, $$idx = ${modelRs.idx};` +
45
- `if (!Array.isArray($$exp)){` +
46
- `${value}=${assignment}}` +
47
- `else{$$exp.splice($$idx, 1, ${assignment})}`
+ return `$set(${modelRs.exp}, ${modelRs.idx}, ${assignment})`
48
}
49
50
0 commit comments