Index: wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php
===================================================================
--- wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php	(revision 45933)
+++ wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php	(working copy)
@@ -210,7 +210,7 @@
 		$prepared_post->ID = $post->ID;
 		$user_id           = get_current_user_id();
 
-		if ( ( 'draft' === $post->post_status || 'auto-draft' === $post->post_status ) && $post->post_author == $user_id ) {
+		if ( ( 'draft' === $post->post_status || 'auto-draft' === $post->post_status ) && $post->post_author === $user_id ) {
 			// Draft posts for the same author: autosaving updates the post and does not create a revision.
 			// Convert the post object to an array and add slashes, wp_update_post expects escaped array.
 			$autosave_id = wp_update_post( wp_slash( (array) $prepared_post ), true );
@@ -347,7 +347,7 @@
 			$autosave_is_different = false;
 
 			foreach ( array_intersect( array_keys( $new_autosave ), array_keys( _wp_post_revision_fields( $post ) ) ) as $field ) {
-				if ( normalize_whitespace( $new_autosave[ $field ] ) != normalize_whitespace( $post->$field ) ) {
+				if ( normalize_whitespace( $new_autosave[ $field ] ) !== normalize_whitespace( $post->$field ) ) {
 					$autosave_is_different = true;
 					break;
 				}
