Skip to content

Commit

Permalink
Editor: Ensure edits precedence in getEditedPostAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Nov 26, 2018
1 parent 9781bcd commit d711318
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ export function getEditedPostAttribute( state, attributeName ) {
// consider caching in a way which would not impact non-merged property
// derivation. Alternatively, introduce a new selector for meta lookup.
return {
...edits[ attributeName ],
...getCurrentPostAttribute( state, attributeName ),
...edits[ attributeName ],
};
}

Expand Down
1 change: 1 addition & 0 deletions packages/editor/src/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ describe( 'selectors', () => {
currentPost: {
meta: {
a: 1,
b: 1,
},
},
editor: {
Expand Down

0 comments on commit d711318

Please sign in to comment.