1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: only get legalValues if definition exists

This commit is contained in:
Fredrik Oseberg 2021-04-28 18:09:37 +02:00
parent 8d003da400
commit d7e6219070

View File

@ -33,9 +33,10 @@ const OverrideConfig = ({
}; };
return overrides.map((o, i) => { return overrides.map((o, i) => {
const legalValues = const definition = contextDefinitions.find(
contextDefinitions.find(c => c.name === o.contextName) c => c.name === o.contextName
.legalValues || []; );
const legalValues = definition ? definition.legalValues : [];
return ( return (
<Grid container key={`override=${i}`} alignItems="center"> <Grid container key={`override=${i}`} alignItems="center">