Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 365d166

Browse files
committed
fixup! fix(change-detector): handle double.NAN for collections (in JS)
1 parent d505f84 commit 365d166

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/change_detection/dirty_checking_change_detector.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ class _CollectionChangeRecord<V> implements CollectionChangeRecord<V> {
10271027
return record..item = item;
10281028
}
10291029

1030-
if (item is num && item.isNaN && record.item is num && record.item.isNaN){
1030+
if (item is num && (item as num).isNaN && record.item is num && (record.item as num).isNaN){
10311031
// we need this for JavaScript since in JS NaN !== NaN.
10321032
return record;
10331033
}

test/change_detection/dirty_checking_change_detector_spec.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ abstract class _CollectionMatcher<T> extends Matcher {
735735
// todo(vicb) merge with _getList() once map is refactored
736736
List<T> _getCollectionList(Function it) {
737737
var result = <T>[];
738-
it((CollectionChangeItem<V> i) {
738+
it((CollectionChangeItem i) {
739739
result.add(i);
740740
});
741741
return result;

0 commit comments

Comments
 (0)