Skip to content

Commit

Permalink
Adjust hasEditorUndo
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Feb 15, 2018
1 parent f11607c commit d1da833
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions editor/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ export function isSavingMetaBoxes( state ) {
* @return {boolean} Whether undo history exists.
*/
export function hasEditorUndo( state ) {
const { past, present } = state.editor;
return past.length > 1 || last( past ) !== present;
return state.editor.past.length > 0;
}

/**
Expand Down

0 comments on commit d1da833

Please sign in to comment.