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

Rename tableCell to parent as tableCell might be confusing.

Maciej Gołaszewski пре 7 година
родитељ
комит
af0077af2d
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      packages/ckeditor5-table/src/converters/tablecell-post-fixer.js

+ 4 - 4
packages/ckeditor5-table/src/converters/tablecell-post-fixer.js

@@ -96,12 +96,12 @@ function tableCellPostFixer( writer, model, mapper ) {
 			}
 		} else {
 			// Check all nodes inside table cell on insert/remove operations (also other blocks).
-			const tableCell = entry.position && entry.position.parent;
+			const parent = entry.position && entry.position.parent;
 
-			if ( tableCell && tableCell.is( 'tableCell' ) ) {
-				const renameTo = tableCell.childCount > 1 ? 'p' : 'span';
+			if ( parent && parent.is( 'tableCell' ) ) {
+				const renameTo = parent.childCount > 1 ? 'p' : 'span';
 
-				for ( const child of tableCell.getChildren() ) {
+				for ( const child of parent.getChildren() ) {
 					renameParagraphIfDifferent( child, renameTo, writer, mapper );
 				}
 			}