diff --git a/app/components/SimpleEditor/SimpleEditor.jsx b/app/components/SimpleEditor/SimpleEditor.jsx index a88a8b4a8a48dee74209aaad3a20527fab9454df..3492ac3b9d8db4b71a19b5b44aef8b5918663489 100644 --- a/app/components/SimpleEditor/SimpleEditor.jsx +++ b/app/components/SimpleEditor/SimpleEditor.jsx @@ -217,8 +217,8 @@ export default class SimpleEditor extends React.Component { } SimpleEditor.propTypes = { - book: React.PropTypes.object.isRequired, - canEdit: React.PropTypes.bool, // needed? + book: React.PropTypes.object, + // canEdit: React.PropTypes.bool, // needed? fragment: React.PropTypes.object, history: React.PropTypes.object.isRequired, onSave: React.PropTypes.func.isRequired, diff --git a/app/components/SimpleEditor/SimpleEditorWrapper.jsx b/app/components/SimpleEditor/SimpleEditorWrapper.jsx index 1e6f62650325b552c49170f7b9072b5707327d69..180008ea2620a14443f48c2ba418cd4bec363881 100644 --- a/app/components/SimpleEditor/SimpleEditorWrapper.jsx +++ b/app/components/SimpleEditor/SimpleEditorWrapper.jsx @@ -17,11 +17,11 @@ export class SimpleEditorWrapper extends React.Component { } componentWillMount () { - const { book, actions } = this.props - const { getCollections, getFragments } = actions + const { getCollections, getFragments } = this.props.actions // TODO: might not need to fetch all the collections? getCollections().then(() => { + const { book } = this.props getFragments(book) }) @@ -93,7 +93,7 @@ export class SimpleEditorWrapper extends React.Component { // TODO -- review required props SimpleEditorWrapper.propTypes = { actions: React.PropTypes.object.isRequired, - book: React.PropTypes.object.isRequired, + book: React.PropTypes.object, fragment: React.PropTypes.object, history: React.PropTypes.object.isRequired, user: React.PropTypes.object.isRequired