refactor(runtime-core): adjust patchProp value arguments order

BREAKING CHANGE: `RendererOptions.patchProp` arguments order has changed

  The `prevValue` and `nextValue` position has been swapped to keep it
  consistent with other functions in the renderer implementation. This
  only affects custom renderers using the `createRenderer` API.
This commit is contained in:
Evan You
2020-03-09 16:15:49 -04:00
parent cd34603864
commit ca5f39ee35
4 changed files with 13 additions and 13 deletions

View File

@@ -147,13 +147,13 @@ export function createHydrationFunctions({
) {
for (const key in props) {
if (!isReservedProp(key) && isOn(key)) {
patchProp(el, key, props[key], null)
patchProp(el, key, null, props[key])
}
}
} else if (props.onClick != null) {
// Fast path for click listeners (which is most often) to avoid
// iterating through props.
patchProp(el, 'onClick', props.onClick, null)
patchProp(el, 'onClick', null, props.onClick)
}
// vnode hooks
const { onVnodeBeforeMount, onVnodeMounted } = props