Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocks: Merge parsed attributes on top of default attributes, instead of reverse #1087

Merged
merged 2 commits into from
Jun 16, 2017

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Jun 9, 2017

I was attempting to change the postsToShow in the Latest Posts block (#870) via manipulating the block's raw attributes (since there is no UI yet in the inspector), but each time I switched back to the Visual tab the number I entered would get reset to the default. It seems the order of defaultAttributes vs attributes is reversed in getBlockAttributes.

@westonruter westonruter changed the title Merge parsed attributes on top of default attributes, instead of reverse Blocks: Merge parsed attributes on top of default attributes, instead of reverse Jun 9, 2017
@westonruter westonruter added the [Type] Bug An existing feature does not function as intended label Jun 9, 2017
Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. 👍 Pushed a unit test revision which would have failed on the previous implementation to help protect against future regressions.

@westonruter westonruter merged commit c0c0ed4 into master Jun 16, 2017
@nb nb deleted the update/get-block-attribute-merge-order branch June 16, 2017 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants