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

Commit 50fc615

Browse files
mheverytravis@travis-ci.org
authored andcommitted
fix(DCCD): when watching variables, always fire on first digest
1 parent 7a2c2d2 commit 50fc615

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/change_detection/dirty_checking_change_detector.dart

-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,6 @@ class DirtyCheckingRecord<H> implements Record<H>, WatchRecord<H> {
467467
} else {
468468
_mode = _MODE_GETTER_;
469469
_getter = _fieldGetterFactory.getter(obj, field);
470-
currentValue = _getter(obj);
471470
}
472471
}
473472
}

test/change_detection/dirty_checking_change_detector_spec.dart

+3
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,9 @@ void main() {
743743
Iterator changeIterator;
744744

745745
detector..watch(user, 'isUnderAgeAsVariable', null);
746+
changeIterator = detector.collectChanges();
747+
expect(changeIterator.moveNext()).toEqual(true);
748+
746749
changeIterator = detector.collectChanges();
747750
expect(changeIterator.moveNext()).toEqual(false);
748751

0 commit comments

Comments
 (0)