Skip to content

Commit

Permalink
chore: remove unused argument (#12006)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored Sep 24, 2024
1 parent 5d9e81d commit 7a00f6f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/runtime-dom/src/directives/vModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const vModelCheckbox: ModelDirective<HTMLInputElement> = {

function setChecked(
el: HTMLInputElement,
{ value, oldValue }: DirectiveBinding,
{ value }: DirectiveBinding,
vnode: VNode,
) {
// store the v-model value on the element so it can be accessed by the
Expand Down Expand Up @@ -225,20 +225,20 @@ export const vModelSelect: ModelDirective<HTMLSelectElement, 'number'> = {
},
// set value in mounted & updated because <select> relies on its children
// <option>s.
mounted(el, { value, modifiers: { number } }) {
setSelected(el, value, number)
mounted(el, { value }) {
setSelected(el, value)
},
beforeUpdate(el, _binding, vnode) {
el[assignKey] = getModelAssigner(vnode)
},
updated(el, { value, modifiers: { number } }) {
updated(el, { value }) {
if (!el._assigning) {
setSelected(el, value, number)
setSelected(el, value)
}
},
}

function setSelected(el: HTMLSelectElement, value: any, number: boolean) {
function setSelected(el: HTMLSelectElement, value: any) {
const isMultiple = el.multiple
const isArrayValue = isArray(value)
if (isMultiple && !isArrayValue && !isSet(value)) {
Expand Down

0 comments on commit 7a00f6f

Please sign in to comment.