fix scene scraper movie error (#3633)

This commit is contained in:
dogwithakeyboard 2023-05-03 04:37:31 +01:00 committed by GitHub
parent 1606f1b17e
commit 1717474a81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -521,7 +521,7 @@ export const SceneScrapeDialog: React.FC<ISceneScrapeDialogProps> = ({
// 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<ISceneScrapeDialogProps> = ({
// 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);