From 966e124ddced7176e30eef7e77821551e6a03723 Mon Sep 17 00:00:00 2001 From: Sarah Norris <1645628+mikachan@users.noreply.github.com> Date: Fri, 13 Oct 2023 21:04:24 +0100 Subject: [PATCH] Add IS_GUTENBERG_PLUGIN flag to LastRevision (#55253) --- .../sidebar-edit-mode/template-panel/last-revision.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/edit-site/src/components/sidebar-edit-mode/template-panel/last-revision.js b/packages/edit-site/src/components/sidebar-edit-mode/template-panel/last-revision.js index a4c5e29aeba69..b81c1b8b6ddbe 100644 --- a/packages/edit-site/src/components/sidebar-edit-mode/template-panel/last-revision.js +++ b/packages/edit-site/src/components/sidebar-edit-mode/template-panel/last-revision.js @@ -31,6 +31,10 @@ const useRevisionData = () => { function PostLastRevisionCheck( { children } ) { const { lastRevisionId, revisionsCount } = useRevisionData(); + if ( ! process.env.IS_GUTENBERG_PLUGIN ) { + return null; + } + if ( ! lastRevisionId || revisionsCount < 2 ) { return null; }