Gazebo_simulation-Frontend/node_modules/react-redux/es/connect/mapStateToProps.js
2020-12-21 10:29:31 -05:00

10 lines
504 B
JavaScript

import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps';
export function whenMapStateToPropsIsFunction(mapStateToProps) {
return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;
}
export function whenMapStateToPropsIsMissing(mapStateToProps) {
return !mapStateToProps ? wrapMapToPropsConstant(function () {
return {};
}) : undefined;
}
export default [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];