Преглед изворни кода

Merge branch 't/ckeditor5-engine/858'
Add omitted changes.

Piotr Jasiun пре 8 година
родитељ
комит
ac688078b0
1 измењених фајлова са 2 додато и 4 уклоњено
  1. 2 4
      packages/ckeditor5-list/src/converters.js

+ 2 - 4
packages/ckeditor5-list/src/converters.js

@@ -349,7 +349,7 @@ export function modelViewMergeAfter( evt, data, consumable, conversionApi ) {
  */
 export function viewModelConverter( evt, data, consumable, conversionApi ) {
 	if ( consumable.consume( data.input, { name: true } ) ) {
-		const batch = data.batch;
+		const batch = conversionApi.batch;
 
 		// 1. Create `listItem` model element.
 		const listItem = batch.createElement( 'listItem' );
@@ -382,9 +382,7 @@ export function viewModelConverter( evt, data, consumable, conversionApi ) {
 			// If this is a view list element, we will convert it and concat the result (`listItem` model elements)
 			// with already gathered results (in `items` array). `converted` should be a `ModelDocumentFragment`.
 			if ( child.name == 'ul' || child.name == 'ol' ) {
-				for ( const child of Array.from( converted.getChildren() ) ) {
-					batch.append( child, items );
-				}
+				batch.append( converted, items );
 			}
 			// If it was not a list it was a "regular" list item content. Just append it to `listItem`.
 			else {