Skip to content

Commit

Permalink
Avoid deleting previous (identacal) autosave, since we now return an …
Browse files Browse the repository at this point in the history
…error.
  • Loading branch information
adamsilverstein committed Dec 29, 2021
1 parent 8492387 commit e8816c3
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ public function create_post_autosave( $post_data ) {
}

if ( ! $autosave_is_different ) {
wp_delete_post_revision( $old_autosave->ID );
return new WP_Error(
'rest_autosave_no_changes',
__( 'There is nothing to save. The autosave and the post content are the same.' ),
Expand Down

0 comments on commit e8816c3

Please sign in to comment.