diff --git a/packages/edit-site/src/components/page-pages/index.js b/packages/edit-site/src/components/page-pages/index.js index de7c47a877e48..22a2ef15e5703 100644 --- a/packages/edit-site/src/components/page-pages/index.js +++ b/packages/edit-site/src/components/page-pages/index.js @@ -117,7 +117,7 @@ export default function PagePages() { header: __( 'Title' ), id: 'title', getValue: ( { item } ) => item.title?.rendered || item.slug, - render: ( { item } ) => { + render: ( { item, view: { type } } ) => { return ( @@ -129,8 +129,7 @@ export default function PagePages() { } } onClick={ ( event ) => { if ( - viewTypeSupportsMap[ view.type ] - .preview + viewTypeSupportsMap[ type ].preview ) { event.preventDefault(); setSelection( [ item.id ] ); @@ -208,7 +207,7 @@ export default function PagePages() { enableSorting: false, }, ], - [ postStatuses, authors, view.type ] + [ postStatuses, authors ] ); const trashPostAction = useTrashPostAction();