Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const mapStateToProps = (state, { record, resource }) => {
const hasRecord = record && record.id != undefined; // eslint-disable-line eqeqeq
return {
expanded: hasRecord ? getIsExpanded(state, resource, record.id) : false,
loading: hasRecord ? getIsLoading(state, resource, record.id) : false,
nodes: hasRecord ? getChildrenNodes(state, resource, record.id) : [],
};
};