Skip to content

Commit

Permalink
fix: removed duplicated entry
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriocomo committed Dec 16, 2024
1 parent 029a5dd commit 6957ada
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/components/EditorFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useController, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next";
import PublicCode from "../contents/publiccode";
import flattenObject from "../flatten-object-to-record";
import { removeDuplicate } from "../yaml-upload";

interface Props {
lang: string;
Expand Down Expand Up @@ -33,7 +34,7 @@ export default function EditorFeatures({ lang }: Props): JSX.Element {
const errorMessage = get(errors, `description.${lang}.features.message`);

const add = () => {
onChange([...features, current.trim()]);
onChange(removeDuplicate([...features, current.trim()]));
setCurrent("");
};

Expand Down

0 comments on commit 6957ada

Please sign in to comment.