Browse Source

Clearing RootElement before filling it with new child nodes.

Szymon Kupś 9 years ago
parent
commit
90fd8aab5c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      packages/ckeditor5-engine/tests/_utils/model.js

+ 1 - 0
packages/ckeditor5-engine/tests/_utils/model.js

@@ -127,6 +127,7 @@ export function parse( data, options = {} ) {
 	if ( options.document ) {
 		document = options.document;
 		root = document.getRoot( rootName );
+		root.removeChildren( 0, root.getChildCount() );
 	} else {
 		document = new Document();
 		root = document.createRoot( rootName );