前端项目实战叁佰陆拾壹react-admin和material ui-Object.prototype.hasOwnProperty.call()判断
Object.prototype.hasOwnProperty.call()判断一个属性是定义在对象本身而不是继承自原型链
if(result !== undefined) {
if(Object.prototype.hasOwnProperty.call(result, 'isPlant')){
redirect(`/lineList/${result['id']}`);
}else{
redirect(`/lineShow/${result['id']}/show`)
}
};