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(jira): More explicitly excise itemKey in removeRow #28664

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

mgaeta
Copy link
Contributor

@mgaeta mgaeta commented Sep 17, 2021

No description provided.

Comment on lines +143 to +145
saveChanges(
Object.fromEntries(Object.entries(value).filter(([key, _]) => key !== itemKey))
);
Copy link

Choose a reason for hiding this comment

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

I think we should put the saveChanges param to a clearer identifier or write a comment explaining what is happening here for readability purpose.

@mgaeta mgaeta merged commit 3b7677d into master Sep 20, 2021
@mgaeta mgaeta deleted the fix/api-2150-jira-sync branch September 20, 2021 21:14
const {[itemKey]: _, ...updatedValue} = value;
saveChanges(updatedValue);
saveChanges(
Object.fromEntries(Object.entries(value).filter(([key, _]) => key !== itemKey))
Copy link
Member

Choose a reason for hiding this comment

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

Object.fromEntries(Object.entries(value).filter(([key]) => key !== itemKey))

You don't need the underscore, you would only need that if you didn't care about earlier indexes in the array.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants