Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): fix re-insertions in the iterable differ #17891

Merged
merged 1 commit into from
Jul 6, 2017

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Jun 30, 2017

fixes #17852

@vicb vicb added area: core Issues related to the framework runtime action: review The PR is still awaiting reviews from at least one requested reviewer labels Jun 30, 2017
@@ -669,7 +670,7 @@ class _DuplicateItemRecordList<V> {
get(trackById: any, afterIndex: number|null): IterableChangeRecord_<V>|null {
let record: IterableChangeRecord_<V>|null;
for (record = this._head; record !== null; record = record._nextDup) {
if ((afterIndex === null || afterIndex < record.currentIndex !) &&
if ((afterIndex === null || afterIndex <= record.currentIndex !) &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

= is the fix

@@ -294,6 +281,22 @@ export function main() {
}));
});

// https://github.com/angular/angular/issues/17852
it('support re-insertion', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

and here is the test

@vicb vicb force-pushed the 0629-iterdiff branch 2 times, most recently from d2dc158 to e4342e1 Compare June 30, 2017 22:10
@mary-poppins
Copy link

You can preview d2dc158 at https://pr17891-d2dc158.ngbuilds.io/.

@mary-poppins
Copy link

You can preview e4342e1 at https://pr17891-e4342e1.ngbuilds.io/.

Copy link
Contributor

@chuckjaz chuckjaz left a comment

Choose a reason for hiding this comment

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

NIT.

@@ -669,7 +670,7 @@ class _DuplicateItemRecordList<V> {
get(trackById: any, afterIndex: number|null): IterableChangeRecord_<V>|null {
Copy link
Contributor

Choose a reason for hiding this comment

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

consider changing the name of afterIndex to atOrAfterIndex as the meaning of this parameter has changed.

@vicb vicb added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jun 30, 2017
@mary-poppins
Copy link

You can preview 7261b03 at https://pr17891-7261b03.ngbuilds.io/.

@jasonaden jasonaden merged commit c69fff1 into angular:master Jul 6, 2017
jasonaden pushed a commit to jasonaden/angular that referenced this pull request Jul 8, 2017
jasonaden pushed a commit to jasonaden/angular that referenced this pull request Jul 8, 2017
@vicb vicb deleted the 0629-iterdiff branch July 31, 2017 22:21
asnowwolf pushed a commit to asnowwolf/angular that referenced this pull request Aug 11, 2017
juleskremer pushed a commit to juleskremer/angular that referenced this pull request Aug 28, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime cla: yes type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NgClass removes existing class when applying array that contains with 2 empty slots
6 participants