Refactor #3965 - ObjectUtils getVNodeProp update

This commit is contained in:
Tuğçe Küçükoğlu 2023-05-24 12:07:53 +03:00
parent 3f9334e4aa
commit 7dc9a486db

View file

@ -195,7 +195,7 @@ export default {
let kebapProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); let kebapProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
let propName = Object.prototype.hasOwnProperty.call(props, kebapProp) ? kebapProp : prop; let propName = Object.prototype.hasOwnProperty.call(props, kebapProp) ? kebapProp : prop;
return vnode.type.props[prop].type === Boolean && props[propName] === '' ? true : props[propName]; return vnode.props[prop] && vnode.props[prop].type === Boolean && props[propName] === '' ? true : props[propName];
} }
return null; return null;