diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-09-22 09:54:24 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-09-22 09:54:24 +0200 |
commit | 0b1888e184d3f995c3130daf794416ad0a4312bc (patch) | |
tree | b22af323c65ad0e4d458ff6ab85bad00b5a39ba8 /packages/gitbook-core/src/components/InjectedComponent.js | |
parent | 2257e42299f28f2a276bf2febd7f5d00e3931c08 (diff) | |
download | gitbook-0b1888e184d3f995c3130daf794416ad0a4312bc.zip gitbook-0b1888e184d3f995c3130daf794416ad0a4312bc.tar.gz gitbook-0b1888e184d3f995c3130daf794416ad0a4312bc.tar.bz2 |
First working version in the browser
Diffstat (limited to 'packages/gitbook-core/src/components/InjectedComponent.js')
-rw-r--r-- | packages/gitbook-core/src/components/InjectedComponent.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/packages/gitbook-core/src/components/InjectedComponent.js b/packages/gitbook-core/src/components/InjectedComponent.js index a4f81fe..cb50e02 100644 --- a/packages/gitbook-core/src/components/InjectedComponent.js +++ b/packages/gitbook-core/src/components/InjectedComponent.js @@ -2,7 +2,6 @@ const React = require('react'); const ReactRedux = require('react-redux'); const { List } = require('immutable'); -const UnsafeComponent = require('./UnsafeComponent'); const { findMatchingComponents } = require('../actions/components'); /* @@ -37,11 +36,8 @@ const Injection = React.createClass({ const Comp = this.props.component; const { props, children } = this.props; - if (Comp.sandbox === false) { - return <Comp {...props}>{children}</Comp>; - } else { - return <UnsafeComponent Component={Comp} props={props}>{children}</UnsafeComponent>; - } + // TODO: try to render with an error handling for unsafe component + return <Comp {...props}>{children}</Comp>; } }); |