Fix passing children into cornerstone-extension
This commit is contained in:
parent
6a3c257cb3
commit
e1f1d9b630
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ohif-cornerstone-extension",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.14",
|
||||
"description": "OHIF extension for Cornerstone",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
|
||||
@ -168,11 +168,11 @@ class OHIFCornerstoneViewport extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const childrenWithProps = null;
|
||||
let childrenWithProps = null;
|
||||
|
||||
// TODO: Does it make more sense to use Context?
|
||||
if (this.props.children && this.props.children.length) {
|
||||
this.props.children.map((child, index) => {
|
||||
childrenWithProps = this.props.children.map((child, index) => {
|
||||
return React.cloneElement(child, { viewportIndex: this.props.viewportIndex, key: index})
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user