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

handle no intervals #3477

Merged
merged 1 commit into from
Jul 11, 2023
Merged

handle no intervals #3477

merged 1 commit into from
Jul 11, 2023

Conversation

hanars
Copy link
Collaborator

@hanars hanars commented Jul 11, 2023

No description provided.

@hanars hanars requested a review from ShifaSZ July 11, 2023 15:44
Comment on lines 83 to +87
return familyGuids.reduce((acc, fGuid) => (
[...acc, ...(intervals[getIntervalGroup(fGuid)] || []).filter(variantIntervalOverlap(variant, padding))]), [])
intervals ? [
...acc, ...(intervals[getIntervalGroup(fGuid)] || []).filter(variantIntervalOverlap(variant, padding)),
] : []
), [])
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding a statement before the return as the following is neater?

if (!intervals) {
  return []
}

or write in as:

return intervals ? familyGuids.reduce((acc, fGuid) => (
    [...acc, ...(intervals[getIntervalGroup(fGuid)] || []).filter(variantIntervalOverlap(variant, padding))]), [])
 : []

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is fine. In an urgent release situation we do not nitpick style

@hanars hanars requested a review from ShifaSZ July 11, 2023 15:51
@hanars hanars merged commit 87fb492 into dev Jul 11, 2023
3 checks passed
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