Skip to content

Commit 35e55ec

Browse files
committed
refactor: remove unnecessary argument
1 parent 96472be commit 35e55ec

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/platforms/web/runtime/modules/dom-props.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) {
4141
elm._value = cur
4242
// avoid resetting cursor position when value is the same
4343
const strCur = isUndef(cur) ? '' : String(cur)
44-
if (shouldUpdateValue(elm, vnode, strCur)) {
44+
if (shouldUpdateValue(elm, strCur)) {
4545
elm.value = strCur
4646
}
4747
} else {
@@ -53,13 +53,9 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) {
5353
// check platforms/web/util/attrs.js acceptValue
5454
type acceptValueElm = HTMLInputElement | HTMLSelectElement | HTMLOptionElement;
5555

56-
function shouldUpdateValue (
57-
elm: acceptValueElm,
58-
vnode: VNodeWithData,
59-
checkVal: string
60-
): boolean {
56+
function shouldUpdateValue (elm: acceptValueElm, checkVal: string): boolean {
6157
return (!elm.composing && (
62-
vnode.tag === 'option' ||
58+
elm.tagName === 'OPTION' ||
6359
isDirty(elm, checkVal) ||
6460
isInputChanged(elm, checkVal)
6561
))

0 commit comments

Comments
 (0)