You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prevent RESET_BLOCKS from affecting reusable blocks (#11746)
* Prevent RESET_BLOCKS from affecting reusable blocks
Changes the editor reducer so that RESET_BLOCKS will only remove blocks
that are actually in the post, i.e. blocks that are a descendent of the
`''` `blocks.order` key.
This fixes a bug where editing a post in Text Mode would break any
reusable blocks in the post.
* Augment RESET_BLOCKS action instead of replacing it
Keep the RESET_BLOCKS logic in the reducer by instead using a
higher-order reducer to augment RESET_BLOCKS with a list of client IDs
that should remain in state as they are referenced by a reusable block.
* Revert "Augment RESET_BLOCKS action instead of replacing it"
This reverts commit 7d3d116.
* Use reduce() to simplify getNestedBlockClientIds()
0 commit comments