mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-05 17:53:12 +02:00
feat: make invalid context properties optional
This commit is contained in:
parent
6363a3265f
commit
cf32af5925
@ -40,7 +40,7 @@ const addStrategyEditLink = (
|
||||
export const advancedPlaygroundViewModel = (
|
||||
input: AdvancedPlaygroundRequestSchema,
|
||||
playgroundResult: AdvancedPlaygroundFeatureEvaluationResult[],
|
||||
invalidContextProperties: string[],
|
||||
invalidContextProperties?: string[],
|
||||
): AdvancedPlaygroundResponseSchema => {
|
||||
const features = playgroundResult.map(({ environments, ...rest }) => {
|
||||
const transformedEnvironments = Object.entries(environments).map(
|
||||
@ -80,7 +80,7 @@ export const advancedPlaygroundViewModel = (
|
||||
};
|
||||
});
|
||||
|
||||
if (invalidContextProperties.length > 0) {
|
||||
if (invalidContextProperties?.length) {
|
||||
return { features, input, warnings: { invalidContextProperties } };
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user