-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
List block: prevent error upon pasting when list is empty #43761
Conversation
@@ -25,7 +25,7 @@ export function createListBlockFromDOMElement( listElement ) { | |||
const [ nestedList, ...nodes ] = children; | |||
|
|||
const hasNestedList = | |||
nestedList.tagName === 'UL' || nestedList.tagName === 'OL'; | |||
nestedList?.tagName === 'UL' || nestedList?.tagName === 'OL'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange how there's no e2e test catching this. Should we add one to test migration from an empty list? How come the integration deprecation tests are passing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed one at aae4651 (it fails without this fix).
Size Change: +33 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
This has been cherry-picked to the |
Fixes #43753