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:
parent
8d003da400
commit
d7e6219070
@ -33,9 +33,10 @@ const OverrideConfig = ({
|
||||
};
|
||||
|
||||
return overrides.map((o, i) => {
|
||||
const legalValues =
|
||||
contextDefinitions.find(c => c.name === o.contextName)
|
||||
.legalValues || [];
|
||||
const definition = contextDefinitions.find(
|
||||
c => c.name === o.contextName
|
||||
);
|
||||
const legalValues = definition ? definition.legalValues : [];
|
||||
|
||||
return (
|
||||
<Grid container key={`override=${i}`} alignItems="center">
|
||||
|
Loading…
Reference in New Issue
Block a user