isSVG: boolean
) => {
if (oldProps !== newProps) {
+ if (oldProps !== EMPTY_OBJ) {
+ for (const key in oldProps) {
+ if (!isReservedProp(key) && !(key in newProps)) {
+ hostPatchProp(
+ el,
+ key,
+ oldProps[key],
+ null,
+ isSVG,
+ vnode.children as VNode[],
+ parentComponent,
+ parentSuspense,
+ unmountChildren
+ )
+ }
+ }
+ }
for (const key in newProps) {
// empty string is not valid prop
if (isReservedProp(key)) continue
)
}
}
- if (oldProps !== EMPTY_OBJ) {
- for (const key in oldProps) {
- if (!isReservedProp(key) && !(key in newProps)) {
- hostPatchProp(
- el,
- key,
- oldProps[key],
- null,
- isSVG,
- vnode.children as VNode[],
- parentComponent,
- parentSuspense,
- unmountChildren
- )
- }
- }
- }
if ('value' in newProps) {
hostPatchProp(el, 'value', oldProps.value, newProps.value)
}