summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-core/src/components/InjectedComponent.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-10-03 14:56:55 +0200
committerSamy Pesse <samypesse@gmail.com>2016-10-03 14:56:55 +0200
commitd82032298dcbfc5c1a6d011a5afe72af9e21ab42 (patch)
tree8c8197be2527f1f3c0f72bc1a4ef711e26241622 /packages/gitbook-core/src/components/InjectedComponent.js
parent34eb35699d951783837faf026a60abadc888a010 (diff)
downloadgitbook-d82032298dcbfc5c1a6d011a5afe72af9e21ab42.zip
gitbook-d82032298dcbfc5c1a6d011a5afe72af9e21ab42.tar.gz
gitbook-d82032298dcbfc5c1a6d011a5afe72af9e21ab42.tar.bz2
Fix new api for activate/deactivate
Diffstat (limited to 'packages/gitbook-core/src/components/InjectedComponent.js')
-rw-r--r--packages/gitbook-core/src/components/InjectedComponent.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/gitbook-core/src/components/InjectedComponent.js b/packages/gitbook-core/src/components/InjectedComponent.js
index cb50e02..ca6e0b0 100644
--- a/packages/gitbook-core/src/components/InjectedComponent.js
+++ b/packages/gitbook-core/src/components/InjectedComponent.js
@@ -78,7 +78,11 @@ const InjectedComponent = React.createClass({
},
render() {
- const { components, props, children } = this.props;
+ let { components, props, children } = this.props;
+
+ if (!children) {
+ children = null;
+ }
return components.reduce((inner, Comp) => {
return (