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

fix(ng-repeat): handle the ref changing to null and back #1017

Merged

Conversation

chirayuk
Copy link
Contributor

@chirayuk chirayuk commented May 8, 2014

This was broken in commit 09871cb.

If the ng-repeat expression changed from an iterable to a null,
ng-repeat would not notice it. This would cause further bugs as it
would not reset its state and the ref became a collection again (i.e.
once out of sync, it was gone forever.)

Closes #1015

This was broken in commit 09871cb.

If the ng-repeat expression changed from an iterable to a null,
ng-repeat would not notice it.  This would cause further bugs as it
would not reset its state and the ref became a collection again (i.e.
once out of sync, it was gone forever.)

Closes dart-archive#1015
@mhevery mhevery merged commit 46b4c0e into dart-archive:master May 8, 2014
_viewPort.remove(row.view);
leftInDom.removeAt(domLength - 1 - index);
});
if (changes == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be even simpler to move this check at the beginning of this method ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

ng-repeat get corrupted when iterating over a null
3 participants