Skip to content

Commit

Permalink
A post is not autosavable when there is a post autosave lock.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Silverstein committed Jun 23, 2019
1 parent 4754431 commit e49367a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,11 @@ export const isEditedPostAutosaveable = createRegistrySelector( ( select ) => fu
return false;
}

// A post is not autosavable when there is a post autosave lock.
if ( isPostAutosavingLocked() ) {
return false;
}

const postType = getCurrentPostType( state );
const postId = getCurrentPostId( state );
const hasFetchedAutosave = select( 'core' ).hasFetchedAutosaves( postType, postId );
Expand Down

0 comments on commit e49367a

Please sign in to comment.