diff --git a/src/components/CloudinaryComponent/CloudinaryComponent.js b/src/components/CloudinaryComponent/CloudinaryComponent.js index 2785096..10ee20f 100644 --- a/src/components/CloudinaryComponent/CloudinaryComponent.js +++ b/src/components/CloudinaryComponent/CloudinaryComponent.js @@ -26,7 +26,7 @@ class CloudinaryComponent extends Component { if(children === undefined || children === null) return null; let mapped = React.Children.map(children, child =>{ let options = {}; - if (child.type && child.type.name === "Transformation"){ + if (child.type && child.type._type === "Transformation"){ options = CloudinaryComponent.normalizeOptions(child.props, child.context); } let childOptions = this.getChildTransformations(child.props.children); diff --git a/src/components/Transformation/Transformation.js b/src/components/Transformation/Transformation.js index 994b470..016a4a8 100644 --- a/src/components/Transformation/Transformation.js +++ b/src/components/Transformation/Transformation.js @@ -5,6 +5,8 @@ import CloudinaryComponent from '../CloudinaryComponent'; * Define a transformation that is applied to the parent tag. */ class Transformation extends CloudinaryComponent { + static _type = "Transformation"; + constructor(props) { super(props); }