Skip to content

Commit

Permalink
fix: bad strict comparision String/Number (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raesta authored May 26, 2023
1 parent af2145b commit caa03ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions admin/src/pages/View/components/NavigationItemForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ const NavigationItemForm: React.FC<NavigationItemFormProps> = ({
if (isEmpty(formik.values.path) && !isEmpty(pathDefaultFields)) {
const selectedEntity = isSingleSelected
? first(contentTypeEntities)
: contentTypeEntities.find(i => i.id === relatedSelectValue);

: contentTypeEntities.find(i => String(i.id) === relatedSelectValue);
const pathDefaultValues = pathDefaultFields
.map((field) => get(selectedEntity, field, ""))
.filter(value => !isNil(value) && String(value).match(/^\S+$/));
Expand Down

0 comments on commit caa03ab

Please sign in to comment.