fix preview pane not loading

This commit is contained in:
Shawn Erquhart 2017-05-16 13:25:21 -04:00
parent c9b5fb446e
commit b01be5d04c

View File

@ -72,7 +72,11 @@ export default class PreviewPane extends React.Component {
render() { render() {
const { entry, collection } = this.props; const { entry, collection } = this.props;
if (!entry || !entry.get('data')) return;
if (!entry || !entry.get('data')) {
return null;
}
const component = registry.getPreviewTemplate(selectTemplateName(collection, entry.get('slug'))) || Preview; const component = registry.getPreviewTemplate(selectTemplateName(collection, entry.get('slug'))) || Preview;
this.inferFields(); this.inferFields();