Răsfoiți Sursa

document.Document moved some code.

Szymon Cofalik 10 ani în urmă
părinte
comite
c069fde5dc
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      packages/ckeditor5-engine/src/treemodel/document.js

+ 3 - 3
packages/ckeditor5-engine/src/treemodel/document.js

@@ -43,9 +43,6 @@ CKEDITOR.define( [
 			 */
 			this.roots = new Map();
 
-			// Graveyard tree root. Document always have a graveyard root, which stores removed nodes.
-			this.createRoot( graveyardSymbol );
-
 			/**
 			 * Document version. It starts from `0` and every operation increases the version number. It is used to ensure that
 			 * operations are applied on the proper document version. If the {@link treeModel.operation.Operation#baseVersion} will
@@ -56,6 +53,9 @@ CKEDITOR.define( [
 			 */
 			this.version = 0;
 
+			// Graveyard tree root. Document always have a graveyard root, which stores removed nodes.
+			this.createRoot( graveyardSymbol );
+
 			/**
 			 * Array of pending changes. See: {@link #enqueueChanges}.
 			 *