I want to check if my object is empty dont render my element, and this is my code:
You could also use something like that:
with the isEmptyObject method defined in your component: isEmptyObject(obj) { return (obj && (Object.keys(obj).length === 0)); } 0 讨论(0) 查看其它7个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
with the isEmptyObject method defined in your component:
isEmptyObject
isEmptyObject(obj) { return (obj && (Object.keys(obj).length === 0)); }