13 lines
251 B
JavaScript
13 lines
251 B
JavaScript
export var getRenderPropValue = function getRenderPropValue(propValue) {
|
|
if (!propValue) {
|
|
return null;
|
|
}
|
|
|
|
var isRenderFunction = typeof propValue === 'function';
|
|
|
|
if (isRenderFunction) {
|
|
return propValue();
|
|
}
|
|
|
|
return propValue;
|
|
}; |