Skip to content

Commit

Permalink
Add IS_GUTENBERG_PLUGIN flag to LastRevision (#55253)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikachan authored and Siobhan committed Oct 16, 2023
1 parent 0afdb21 commit 707bf2a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 707bf2a

Please sign in to comment.