Skip to content

Commit 1979d5f

Browse files
kwonojbenlesh
authored andcommitted
refactor(distinctUntilKeyChanged): remote thisArg
1 parent daca7b1 commit 1979d5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import {distinctUntilChanged} from '../distinctUntilChanged';
22

3-
export function distinctUntilKeyChanged<T>(key: string, compare?: (x: any, y: any) => boolean, thisArg?: any) {
3+
export function distinctUntilKeyChanged<T>(key: string, compare?: (x: any, y: any) => boolean) {
44
return distinctUntilChanged.call(this, function(x, y) {
55
if (compare) {
6-
return compare.call(thisArg, x[key], y[key]);
6+
return compare(x[key], y[key]);
77
}
88
return x[key] === y[key];
99
});
10-
}
10+
}

0 commit comments

Comments
 (0)