Skip to content

Commit 2d3afdf

Browse files
author
Amir Tocker
committed
Refactor test for Transformation. Fixes #17. Fixes #13. References #10.
1 parent d7d3c4a commit 2d3afdf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/components/CloudinaryComponent/CloudinaryComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CloudinaryComponent extends Component {
2626
if(children === undefined || children === null) return null;
2727
let mapped = React.Children.map(children, child =>{
2828
let options = {};
29-
if (child.type && child.type.name === "Transformation"){
29+
if (child.type && child.type.exposesProps){
3030
options = CloudinaryComponent.normalizeOptions(child.props, child.context);
3131
}
3232
let childOptions = this.getChildTransformations(child.props.children);

src/components/Transformation/Transformation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ class Transformation extends CloudinaryComponent {
1616
Transformation.propTypes = CloudinaryComponent.propTypes;
1717
Transformation.defaultProps = {};
1818
Transformation.contextTypes = {};
19+
Transformation.exposesProps = true;
1920

2021
export default Transformation;

0 commit comments

Comments
 (0)