Fix content type update after first creation

This commit is contained in:
cyril lopez 2017-10-25 15:06:33 +02:00
parent b964e83953
commit 4dbaaf17cf

View File

@ -72,7 +72,7 @@ export class ModelPage extends React.Component { // eslint-disable-line react/pr
componentWillReceiveProps(nextProps) {
if (this.props.updatedContentType !== nextProps.updatedContentType) {
if (this.state.contentTypeTemporary) {
if (this.state.contentTypeTemporary && storeData.getContentType()) {
this.props.modelFetchSucceeded({ model: storeData.getContentType() });
} else {
this.fetchModel(nextProps);