File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2216,9 +2216,8 @@ diff_match_patch.prototype.patch_splitMax = function(patches) {
2216
2216
} ;
2217
2217
2218
2218
diff_match_patch . prototype . diffs_joinSurrogatePairs = function ( diffs ) {
2219
- var newDiffs = [ ] ;
2220
-
2221
2219
var lastEnd ;
2220
+ var overwrittenDiffsCounter = 0 ;
2222
2221
2223
2222
for ( var x = 0 ; x < diffs . length ; x ++ ) {
2224
2223
var thisDiff = diffs [ x ] ;
@@ -2244,10 +2243,11 @@ diff_match_patch.prototype.diffs_joinSurrogatePairs = function(diffs) {
2244
2243
continue ;
2245
2244
}
2246
2245
2247
- newDiffs . push ( thisDiff )
2246
+ diffs [ overwrittenDiffsCounter ] = thisDiff ;
2247
+ overwrittenDiffsCounter ++ ;
2248
2248
}
2249
2249
2250
- return newDiffs
2250
+ return diffs . splice ( 0 , overwrittenDiffsCounter )
2251
2251
}
2252
2252
2253
2253
diff_match_patch . prototype . patch_joinSurrogatePairs = function ( patch ) {
You can’t perform that action at this time.
0 commit comments