From 51fe1e1f11ab8912e01d4d5090c554e3582917fd Mon Sep 17 00:00:00 2001 From: Xen0Xys Date: Thu, 4 Jul 2024 23:53:55 +0200 Subject: [PATCH] :ambulance: Try fixing duplicate image crash --- src/modules/webtoon/webtoon/webtoon-database.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/webtoon/webtoon/webtoon-database.service.ts b/src/modules/webtoon/webtoon/webtoon-database.service.ts index 812bbf8..d7840ed 100644 --- a/src/modules/webtoon/webtoon/webtoon-database.service.ts +++ b/src/modules/webtoon/webtoon/webtoon-database.service.ts @@ -79,10 +79,10 @@ export class WebtoonDatabaseService{ } }); const imagesToSave: any[] = []; - for(let i: number = 0; i < episodeData.images.length; i++){ - if(!dbImages.find((dbImage: any) => dbImage.sum === this.miscService.getSum(episodeData.images[i]))) + for(let i: number = 0; i < imagesSum.length; i++){ + if(!dbImages.find(dbImage => dbImage.sum === imagesSum[i])) imagesToSave.push({ - sum: this.miscService.getSum(episodeData.images[i]), + sum: imagesSum[i], type_id: imageType.id, }); }