-
Notifications
You must be signed in to change notification settings - Fork 25.7k
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
Conversation
@@ -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 !) && |
There was a problem hiding this comment.
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', () => { |
There was a problem hiding this comment.
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
d2dc158
to
e4342e1
Compare
You can preview d2dc158 at https://pr17891-d2dc158.ngbuilds.io/. |
You can preview e4342e1 at https://pr17891-e4342e1.ngbuilds.io/. |
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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.
You can preview 7261b03 at https://pr17891-7261b03.ngbuilds.io/. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
fixes #17852