You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
343 B
JavaScript
14 lines
343 B
JavaScript
function updateProps(oldVnode, vnode) {
|
|
var key, cur, old, elm = vnode.elm,
|
|
oldProps = oldVnode.data.props || {}, props = vnode.data.props || {};
|
|
for (key in props) {
|
|
cur = props[key];
|
|
old = oldProps[key];
|
|
if (old !== cur) {
|
|
elm[key] = cur;
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = {create: updateProps, update: updateProps};
|