Skip to content

Commit c711f26

Browse files
author
Gerardo Pacheco
authored
Mobile - List V2 - Prevent error when list is empty (#43861)
1 parent 3b72dae commit c711f26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/block-library/src/list/v2/migrate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function createListBlockFromDOMElement( listElement ) {
3030
const [ nestedList, ...nodes ] = children;
3131

3232
const hasNestedList =
33-
nestedList.tagName === 'UL' || nestedList.tagName === 'OL';
33+
nestedList?.tagName === 'UL' || nestedList?.tagName === 'OL';
3434
if ( ! hasNestedList ) {
3535
return createBlock( 'core/list-item', {
3636
content: listItem.innerHTML,

0 commit comments

Comments
 (0)