diff --git a/src/treeDiffer.Differ.js b/src/treeDiffer.Differ.js index 46fc93b..9606fbe 100644 --- a/src/treeDiffer.Differ.js +++ b/src/treeDiffer.Differ.js @@ -237,7 +237,9 @@ treeDiffer.Differ.prototype.findMinimumTransactions = function ( keyRoot1, keyRo } } - this.transactions[ i ][ j ] = transactions[ i ][ j ].slice(); + // No need to do a shallow copy here as transactions[ i ][ j ] and + // this.transactions[ i ][ j ] will never be changed again after this line. + this.transactions[ i ][ j ] = transactions[ i ][ j ]; } else { // Previous transactions, leading up to a remove, insert or change