Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/runtime-dom/src/directives/vModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const vModelCheckbox: Directive<HTMLInputElement> = {
if (i > -1) {
assign([...modelValue.slice(0, i), ...modelValue.slice(i + 1)])
} else {
assign(modelValue.concat(elementValue))
assign(modelValue.concat([elementValue]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you prefer creating an array?
The previous version is correct.

concat

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes... you are right.
the code of vue2.x misled me. 😂

}
} else {
assign(el.checked)
Expand Down