From 8b18b8cca479592c6e3a0ba14ddb19845c076d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Tue, 16 Feb 2021 13:30:26 +0100 Subject: [PATCH] fix: filter duplicates --- .../component/feature/strategy/flexible-rollout-strategy.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/feature/strategy/flexible-rollout-strategy.jsx b/frontend/src/component/feature/strategy/flexible-rollout-strategy.jsx index 4aa5bd9d36..8ed746bff0 100644 --- a/frontend/src/component/feature/strategy/flexible-rollout-strategy.jsx +++ b/frontend/src/component/feature/strategy/flexible-rollout-strategy.jsx @@ -25,7 +25,10 @@ export default class FlexibleRolloutStrategy extends Component { resolveStickiness = () => { const { context } = this.props; return builtInStickinessOptions.concat( - context.filter(c => c.stickiness).map(c => ({ key: c.name, label: c.name })) + context + .filter(c => c.stickiness) + .filter(c => !builtInStickinessOptions.find(s => s.key === c.name)) + .map(c => ({ key: c.name, label: c.name })) ); };