8
0
Просмотр исходного кода

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

Oskar Wróbel 7 лет назад
Родитель
Сommit
c65ddc2650
1 измененных файлов с 2 добавлено и 2 удалено
  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 ) {
 		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;
 
 			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;
 
 		return pos;