Skip to content

Commit

Permalink
fix empty enum values
Browse files Browse the repository at this point in the history
  • Loading branch information
sdirix committed Apr 18, 2024
1 parent 187b614 commit 13fa9c5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/src/util/label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,12 @@ export const computeChildLabel = (
return '';
}

const currentValue = get(childData, childLabelProp, '');
const currentValue = get(childData, childLabelProp);

// in case there is no value, then we can't map it to an enum or oneOf
if (currentValue === undefined) {
return '';
}

// check whether the value is part of a oneOf or enum and needs to be translated
const childSchema = Resolve.schema(
Expand Down

0 comments on commit 13fa9c5

Please sign in to comment.