mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/RoboCommander.git
synced 2026-06-15 12:46:04 +00:00
13 lines
507 B
JavaScript
13 lines
507 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]; |