8
0
Pārlūkot izejas kodu

Array#map changed to Array#slice because we don't need callback for elements.

Kuba Niegowski 5 gadi atpakaļ
vecāks
revīzija
1787e7abc3
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      packages/ckeditor5-utils/src/fastdiff.js

+ 2 - 2
packages/ckeditor5-utils/src/fastdiff.js

@@ -103,11 +103,11 @@ export default function fastDiff( a, b, cmp, atomicChanges = false ) {
 	// Transform text or any iterable into arrays for easier, consistent processing.
 	// Array.from was used here but it generated incorrect results for multi-byte unicode sequences.
 	if ( !Array.isArray( a ) ) {
-		a = Array.prototype.map.call( a, c => c );
+		a = Array.prototype.slice.call( a );
 	}
 
 	if ( !Array.isArray( b ) ) {
-		b = Array.prototype.map.call( b, c => c );
+		b = Array.prototype.slice.call( b );
 	}
 
 	// Find first and last change.