mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: check that strategies exists before calling includes (#252)
This commit is contained in:
parent
95d83dc812
commit
be8b0e7358
@ -7,7 +7,11 @@ import { hasPermission } from '../../permissions';
|
||||
|
||||
const mapStateToProps = (state, props) => {
|
||||
let strategy = state.strategies.get('list').find(n => n.name === props.strategyName);
|
||||
const applications = state.applications.get('list').filter(app => app.strategies.includes(props.strategyName));
|
||||
|
||||
const applications = state.applications
|
||||
.get('list')
|
||||
.filter(app => app.strategies && app.strategies.includes(props.strategyName));
|
||||
|
||||
const toggles = state.features.filter(
|
||||
toggle => toggle.get('strategies').findIndex(s => s.name === props.strategyName) > -1
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user