Skip to content

Conversation

remnantdotdev
Copy link
Collaborator

No description provided.

indexes_to_remove.push(index);
meeting.day.forEach(day => {
meetings_to_add.push({
...meeting,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If I'm understanding the intent of flattenDays correctly, I'm not sure this function was ever working since the ...meeting was overriding the day and slug set 👀

Copy link
Contributor

Choose a reason for hiding this comment

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

haha 🤦

the intent of this function is to allow people to have a JSON feed that has day: [0, 1, 2] or a Google Sheet that has day = Sunday, Monday, Tuesday -- but it's very infrequently used so i'm not surprised it was a lurking bug. glad you found it!


indexes_to_remove.forEach(index => {
data = data.splice(index, 1);
data.splice(index, 1);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

and data = data.splice(index, 1); was adding the newly created objects with the old one instead of mutating in place

@remnantdotdev remnantdotdev marked this pull request as ready for review February 8, 2022 06:16
@remnantdotdev remnantdotdev self-assigned this Feb 8, 2022
@joshreisner joshreisner merged commit 5c375eb into main Feb 8, 2022
@remnantdotdev remnantdotdev deleted the tests-and-types branch February 8, 2022 06:53
joshreisner pushed a commit that referenced this pull request Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants