Răsfoiți Sursa

Removed creating new array from position path when creating position from JSON.

Oskar Wróbel 7 ani în urmă
părinte
comite
c65ddc2650
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      packages/ckeditor5-engine/src/model/position.js

+ 2 - 2
packages/ckeditor5-engine/src/model/position.js

@@ -926,7 +926,7 @@ export default class Position {
 	 */
 	 */
 	static fromJSON( json, doc ) {
 	static fromJSON( json, doc ) {
 		if ( json.root === '$graveyard' ) {
 		if ( json.root === '$graveyard' ) {
-			const pos = new Position( doc.graveyard, Array.from( json.path ) );
+			const pos = new Position( doc.graveyard, json.path );
 			pos.stickiness = json.stickiness;
 			pos.stickiness = json.stickiness;
 
 
 			return pos;
 			return pos;
@@ -945,7 +945,7 @@ export default class Position {
 			);
 			);
 		}
 		}
 
 
-		const pos = new Position( doc.getRoot( json.root ), Array.from( json.path ) );
+		const pos = new Position( doc.getRoot( json.root ), json.path );
 		pos.stickiness = json.stickiness;
 		pos.stickiness = json.stickiness;
 
 
 		return pos;
 		return pos;