Sfoglia il codice sorgente

Use spread operator for concatenating paths in Position constructor.

Maciej Gołaszewski 5 anni fa
parent
commit
93f73bcbbe
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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;
 
 		/**