|
|
@@ -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.
|