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

Mirroring script: Combine statements in array #16342

Merged
merged 11 commits into from
May 21, 2022

Conversation

queengooborg
Copy link
Contributor

This PR is a subset from #6582 that introduces a function to combine statements in an array as needed when mirroring.

@github-actions github-actions bot added the scripts Issues or pull requests regarding the scripts in scripts/. label May 18, 2022
@github-actions
Copy link

This pull request has merge conflicts that must be resolved before we can merge this.

@github-actions
Copy link

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);
Copy link
Contributor

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?

Copy link
Contributor Author

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!

Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link

This pull request has merge conflicts that must be resolved before we can merge this.

@queengooborg queengooborg merged commit 6fabb8b into mdn:main May 21, 2022
@queengooborg queengooborg deleted the scripts/mirror/combineStatements branch May 21, 2022 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scripts Issues or pull requests regarding the scripts in scripts/.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants