From 63775a5e99b7d8d5609a00366552a6bcb4c50ccc Mon Sep 17 00:00:00 2001 From: MathieuG-P <40181755+Zagrios@users.noreply.github.com> Date: Tue, 6 Dec 2022 23:31:50 +0100 Subject: [PATCH] fix bug --- src/renderer/services/maps-manager.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/services/maps-manager.service.ts b/src/renderer/services/maps-manager.service.ts index bc9caf15..6b2e28ea 100644 --- a/src/renderer/services/maps-manager.service.ts +++ b/src/renderer/services/maps-manager.service.ts @@ -42,10 +42,10 @@ export class MapsManagerService { if(!withDetails){ return obs.complete(); } - console.log("GET DETAILS"); - this.bsaver.getMapDetailsFromHashs(res.data.map(localMap => localMap.hash)).pipe(finalize(() => obs.complete())).subscribe(mapsDetails => { mapsDetails.forEach(details => { + const corespondingMap = res.data.find(localMap => localMap.hash === details.versions.find(details => details?.hash === localMap.hash)?.hash); + if(!corespondingMap){ return; } res.data.find(localMap => localMap.hash === details.versions.find(details => details?.hash === localMap.hash)?.hash).bsaverInfo = details }); obs.next(res.data);