diff --git a/src/components/Collection/Series/EditSeriesModal.tsx b/src/components/Collection/Series/EditSeriesModal.tsx index a8e1f2b65..b1e54f8af 100644 --- a/src/components/Collection/Series/EditSeriesModal.tsx +++ b/src/components/Collection/Series/EditSeriesModal.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import cx from 'classnames'; import { map } from 'lodash'; @@ -52,6 +52,8 @@ const EditSeriesModal = () => { dispatch(setSeriesId(-1)); }); + useEffect(() => onClose, [onClose]); + const seriesId = useSelector((state: RootState) => state.modals.editSeries.seriesId); const [activeTab, setActiveTab] = useState('name');