From 7764cb2feeb4f93e977cb5776eaa13c39ba99418 Mon Sep 17 00:00:00 2001 From: Celine Sebe Date: Thu, 26 Sep 2024 09:16:41 +0200 Subject: [PATCH] [frontend] TS issue (#7400) --- .../src/private/components/data/feeds/FeedCreation.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opencti-platform/opencti-front/src/private/components/data/feeds/FeedCreation.tsx b/opencti-platform/opencti-front/src/private/components/data/feeds/FeedCreation.tsx index 401c0309d1fa6..844206f8c80c7 100644 --- a/opencti-platform/opencti-front/src/private/components/data/feeds/FeedCreation.tsx +++ b/opencti-platform/opencti-front/src/private/components/data/feeds/FeedCreation.tsx @@ -145,7 +145,7 @@ interface FeedCreationFormProps { open: boolean; isDuplicated: boolean; onDrawerClose: () => void; - feed?: FeedAddInput; + feed: FeedAddInput | undefined; } const feedCreationValidation = (t_i18n: (s: string) => string) => Yup.object().shape({ @@ -175,7 +175,7 @@ const FeedCreation: FunctionComponent = (props) => { ...n, mappings: R.indexBy(R.prop('type'), n.mappings), })) - : []; // Si `feed_attributes` est null ou undefined, initialisez avec un tableau vide + : []; const [feedAttributes, setFeedAttributes] = useState(feedAttributesInitialState); const { ignoredAttributesInFeeds } = useAttributes(); @@ -183,7 +183,7 @@ const FeedCreation: FunctionComponent = (props) => { const handleClose = () => { setSelectedTypes([]); helpers.handleClearAllFilters(); - setFeedAttributes({ 0: {} }); + setFeedAttributes(feedAttributesInitialState); if (!isDuplicated) { onDrawerClose(); }