Comments (4)
The BlockSwitcher
checks the validity of blocks before rendering transformation options. It was introduced initially to solve a similar error - #28122.
I'm not against updating the getBlocksByClientId
, but we should examine its usage in the code base in case any consumer relies on current behavior.
gutenberg/packages/block-editor/src/components/block-switcher/index.js
Lines 182 to 184 in 599f336
from gutenberg.
Thanks for the report.
I also think that it should prevent the block editor from crashing, and that returning an array with null
when the getBlocksByClientId
parameter contains an invalid ID is not the expected behavior.
The getBlocksByClientId
is expected to return an array of type WPBlock
, but looking at the type below, null
should not be allowed.
gutenberg/packages/blocks/src/api/parser/index.js
Lines 42 to 50 in 908e3ed
from gutenberg.
For now I opened a PR with a spot remedy.
from gutenberg.
Fixed by #59410
from gutenberg.
Related Issues (20)
- Add shuffling for header and footer template parts when zoomed out HOT 2
- Convert to component: Badge HOT 3
- wp-scripts: minification of CSS imports is done too early in the process
- Improper Inserter block title text wrapping HOT 2
- Limit where the more block can be inserted HOT 3
- Components: move border style utils to `block-editor` package HOT 2
- Phase 3: Block Library
- Font Library: third-party integration HOT 12
- Site editor modal on small viewports respects invisible admin bar
- Release Workflow: cherry picking gutenberg.php changes into trunk can cause the workflow to fail due to merge conflicts.
- LinkControl: Provide better way to see the full URLs HOT 2
- Phase 3: Workflows
- Phase 3: Revisions
- Phase 3: Collaboration index
- DateTimePicker: AM/PM switcher is not screen reader accessible HOT 2
- Moving blocks via keyboard: screen readers don't notify operation done
- HTML structure of navigation blocks differs between editor and front
- Scripts: `plugin-zip` command does not exclude files not included in `files` field
- Patterns Page: Routing issue HOT 2
- Template Parts: name displayed inconsistent in UI HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gutenberg.