Skip to content

Commit d5003de

Browse files
committed
clone arrays so we don't alter input values
1 parent 0bb9c4c commit d5003de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/diff/array.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Diff from './base';
22

33
export const arrayDiff = new Diff();
44
arrayDiff.tokenize = arrayDiff.join = function(value) {
5-
return value;
5+
return value.slice();
66
};
77

88
export function diffArrays(oldArr, newArr, callback) { return arrayDiff.diff(oldArr, newArr, callback); }

0 commit comments

Comments
 (0)