-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Mirroring script: Combine statements in array #16342
Mirroring script: Combine statements in array #16342
Conversation
This pull request has merge conflicts that must be resolved before we can merge this. |
This pull request has merge conflicts that must be resolved before we can merge this. |
newNotes = newNotes.filter((item, pos) => { | ||
newNotes.indexOf(item) == pos; | ||
}); | ||
newNotes = newNotes.filter((item, pos) => newNotes.indexOf(item) == pos); |
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.
Does this deduplicate the notes? And wasn't the old implementation broken, i.e. the block returned undefined
for every note?
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.
That's correct, for both!
Co-authored-by: Claas Augner <[email protected]>
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.
LGTM
This pull request has merge conflicts that must be resolved before we can merge this. |
This PR is a subset from #6582 that introduces a function to combine statements in an array as needed when mirroring.