Prevent being able to migrate entry to itself

This commit is contained in:
schroda
2026-06-05 14:52:12 +02:00
parent 848753022a
commit 09c04f4b62
5 changed files with 17 additions and 4 deletions

View File

@@ -157,7 +157,8 @@ const SourceSearchPreview = React.memo(
const { data: searchResult, isLoading, error, abortRequest } = results[0]!;
currentAbortRequest.current = abortRequest;
const mangas = searchResult?.fetchSourceManga?.mangas ?? STABLE_EMPTY_ARRAY;
const tmpMangas = searchResult?.fetchSourceManga?.mangas ?? STABLE_EMPTY_ARRAY;
const mangas = tmpMangas.filter((manga) => manga.id !== mangaId);
const noMangasFound = !error && !isLoading && !mangas.length;
useEffect(() => {