Przeglądaj źródła

Simplify autoParagraphEmptyRoots() usages.

Maciej 5 lat temu
rodzic
commit
2af2831974

+ 1 - 1
packages/ckeditor5-engine/src/controller/datacontroller.js

@@ -145,7 +145,7 @@ export default class DataController {
 		// Fix empty roots after DataController is 'ready' (note that init method could be decorated and stopped).
 		// We need to handle this event because initial data could be empty and post-fixer would not get triggered.
 		this.on( 'ready', () => {
-			this.model.enqueueChange( 'transparent', writer => autoParagraphEmptyRoots( writer ) );
+			this.model.enqueueChange( 'transparent', autoParagraphEmptyRoots );
 		}, { priority: 'lowest' } );
 	}
 

+ 1 - 1
packages/ckeditor5-engine/src/model/model.js

@@ -124,7 +124,7 @@ export default class Model {
 		injectSelectionPostFixer( this );
 
 		// Post-fixer which takes care of adding empty paragraph elements to the empty roots.
-		this.document.registerPostFixer( writer => autoParagraphEmptyRoots( writer ) );
+		this.document.registerPostFixer( autoParagraphEmptyRoots );
 
 		// @if CK_DEBUG_ENGINE // this.on( 'applyOperation', () => {
 		// @if CK_DEBUG_ENGINE // 	dumpTrees( this.document, this.document.version );