From 1717474a8161f15b7c5dbbe497800df146b572af Mon Sep 17 00:00:00 2001 From: dogwithakeyboard <128322708+dogwithakeyboard@users.noreply.github.com> Date: Wed, 3 May 2023 04:37:31 +0100 Subject: [PATCH] fix scene scraper movie error (#3633) --- .../src/components/Scenes/SceneDetails/SceneScrapeDialog.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/SceneScrapeDialog.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/SceneScrapeDialog.tsx index 953b24b64..cf658200a 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/SceneScrapeDialog.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/SceneScrapeDialog.tsx @@ -521,7 +521,7 @@ export const SceneScrapeDialog: React.FC = ({ // remove the movie from the list const newMoviesClone = newMovies.concat(); - const pIndex = newMoviesClone.indexOf(toCreate); + const pIndex = newMoviesClone.findIndex((p) => p.name === toCreate.name); if (pIndex === -1) throw new Error("Could not find movie to remove"); newMoviesClone.splice(pIndex, 1); @@ -558,7 +558,7 @@ export const SceneScrapeDialog: React.FC = ({ // remove the tag from the list const newTagsClone = newTags.concat(); const pIndex = newTagsClone.indexOf(toCreate); - if (pIndex === -1) throw new Error("Could not find performer to remove"); + if (pIndex === -1) throw new Error("Could not find tag to remove"); newTagsClone.splice(pIndex, 1); setNewTags(newTagsClone);