Skip to content

Commit

Permalink
State: Update selector dependants to new editor history
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Nov 3, 2017
1 parent 2e91181 commit e9d8a69
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions editor/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,15 +453,15 @@ export const getBlock = createSelector(
};
},
( state, uid ) => [
get( state, [ 'editor', 'blocksByUid', uid ] ),
get( state, 'editor.edits.meta' ),
get( state, [ 'editor', 'present', 'blocksByUid', uid ] ),
get( state, [ 'editor', 'present', 'edits', 'meta' ] ),
get( state, 'currentPost.meta' ),
]
);

function getPostMeta( state, key ) {
return has( state, [ 'editor', 'edits', 'meta', key ] ) ?
get( state, [ 'editor', 'edits', 'meta', key ] ) :
return has( state, [ 'editor', 'edits', 'present', 'meta', key ] ) ?
get( state, [ 'editor', 'edits', 'present', 'meta', key ] ) :
get( state, [ 'currentPost', 'meta', key ] );
}

Expand Down

0 comments on commit e9d8a69

Please sign in to comment.