Explorar o código

Use spread operator for concatenating paths in Position constructor.

Maciej Gołaszewski %!s(int64=5) %!d(string=hai) anos
pai
achega
93f73bcbbe
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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).
-		path = root.getPath().concat( path );
+		path = [ ...root.getPath(), ...path ];
 		root = root.root;
 
 		/**