Explorar el Código

Use spread operator for concatenating paths in Position constructor.

Maciej Gołaszewski hace 5 años
padre
commit
93f73bcbbe
Se han modificado 1 ficheros con 1 adiciones y 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;
 
 		/**