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: Combine segment override and value change requests #4734

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions frontend/web/components/modals/AssociatedSegmentOverrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,7 @@ class TheComponent extends Component {
}
renderRow={(v) => (
<div key={v.feature.id} className='list-item-override p-3 mb-4'>
<div
onClick={() => {
// window.open(`${document.location.origin}/project/${this.props.projectId}/environment/${v.env.api_key}/features?feature=${v.feature.id}&tab=1`)
}}
>
<div>
<WrappedSegmentOverrides
onSave={this.fetch}
projectFlag={v.feature}
Expand Down Expand Up @@ -331,9 +327,10 @@ export default class SegmentOverridesInner extends Component {
)
this.setState({ isSaving: true })
})
const segmentOverride =
segmentOverrides && segmentOverrides.filter((v) => v.segment === id)
if (!segmentOverrides) return null
const segmentOverride = segmentOverrides?.filter?.(
(v) => v.segment === id,
)
if (!segmentOverride?.length) return null
return (
<div>
{originalSegmentOverrides.length > 1 && (
Expand Down
Loading