Преглед изворни кода

Use spread operator for concatenating paths in Position constructor.

Maciej Gołaszewski пре 5 година
родитељ
комит
93f73bcbbe
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      packages/ckeditor5-engine/src/model/position.js

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

@@ -82,7 +82,7 @@ export default class Position {
 		}
 		}
 
 
 		// Normalize the root and path (if element was passed).
 		// Normalize the root and path (if element was passed).
-		path = root.getPath().concat( path );
+		path = [ ...root.getPath(), ...path ];
 		root = root.root;
 		root = root.root;
 
 
 		/**
 		/**