Update EntryPageHOC for React Router 4.

This commit is contained in:
Caleb 2017-10-13 17:37:17 -06:00 committed by Shawn Erquhart
parent 5bdc8dd87f
commit f966cd81bd

View File

@ -18,8 +18,8 @@ export default function EntryPageHOC(EntryPage) {
const returnObj = { isEditorialWorkflow, showDelete: !ownProps.newEntry };
if (isEditorialWorkflow) {
returnObj.showDelete = false;
const slug = ownProps.params.slug;
const collection = collections.get(ownProps.params.name);
const slug = ownProps.match.params.slug;
const collection = collections.get(ownProps.match.params.name);
const unpublishedEntry = selectUnpublishedEntry(state, collection.get('name'), slug);
if (unpublishedEntry) {
returnObj.unpublishedEntry = true;