Fix page crashing when duplicating immovable blocks#3593
Merged
swissspidy merged 12 commits intodevelopfrom Oct 23, 2019
Merged
Fix page crashing when duplicating immovable blocks#3593swissspidy merged 12 commits intodevelopfrom
swissspidy merged 12 commits intodevelopfrom
Conversation
barklund
reviewed
Oct 22, 2019
barklund
reviewed
Oct 22, 2019
| media: mediaObject, | ||
| videoFeaturedImage: videoThumbnail, | ||
| getBlockOrder, | ||
| getImmovableBlocks: ( pageClientId ) => { |
Contributor
There was a problem hiding this comment.
You only ever invoke this with clientId - why not actually extract the list here and store it in a immovableBlocks variable? Or is there a need for a function here? It also makes the dependencies of the subsequent useEffect's more clear.
However, do remember to add clientId to the dependencies of this useSelect (it's already used here, so it's a mistake it hasn't been done already).
@swissspidy, do you know if we can add useSelect to the automatic eslint-based dependency-check? There's probably an option to add custom hooks to the validator? This hook is probably missing more than just clientId.
Collaborator
There was a problem hiding this comment.
barklund
reviewed
Oct 22, 2019
barklund
reviewed
Oct 22, 2019
Co-Authored-By: Morten Barklund <morten@barklund.dk>
barklund
reviewed
Oct 22, 2019
…ect/amp-wp into fix/3467-page_crash_on_duplicate
swissspidy
approved these changes
Oct 23, 2019
Collaborator
swissspidy
left a comment
There was a problem hiding this comment.
Works like a charm 👍
westonruter
added a commit
that referenced
this pull request
Oct 25, 2019
…-args-debugging * 'develop' of github.com:ampproject/amp-wp: (163 commits) Remove entries array test after completed. Update dependency core-js to v3.3.4 (#3624) Quick UX fixes (#3611) Fix most pressing RTL issues (#3558) Add test case for broken parent relationship Adapt broken test Throw a _doing_it_wrong() when an expected parent is not found Change template hierarchy query arguments to public Reuse data-set-focus to reliably match twentytwenty keyboard focus management Add tabindex attribute to modals Guess the role of a modal based on its classes Disable Code Editor (#3608) Update dependency postcss to v7.0.20 (#3613) Update dependency autoprefixer to v9.7.0 (#3614) Update dependency browserslist to v4.7.2 (#3612) Add rel=preconnect link for AMP CDN Fix block nav padding and margin (#3610) Adjust Gutenberg / WordPress requirement (#3609) Don't allow multiple CTA / attachment block to be pasted. (#3601) Fix page crashing when duplicating immovable blocks (#3593) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3467
Fixes Page Crashing when duplicating immovable blocks.
Checklist