Skip to content

Commit

Permalink
clarify use of isEditedPostSaveable in effects/AUTOSAVE
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Silverstein committed May 23, 2018
1 parent 7b1945a commit 7034cdc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/store/effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ export default {
AUTOSAVE( action, store ) {
const { getState, dispatch } = store;
const state = getState();

// A post must contain a title, an excerpt, or non-empty content to be valid for an autosave.
if ( ! isEditedPostSaveable( state ) ) {
return;
}
Expand Down

0 comments on commit 7034cdc

Please sign in to comment.