Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

fix: Fixed small issue when counting users per scene for explorer #1371

Merged
merged 3 commits into from
Sep 28, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions kernel/packages/shared/social/hotScenes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ function countUsers(a: HotSceneInfoRaw) {

async function fillHotScenesRecord(candidate: Candidate, crowdedScenes: Record<string, HotSceneInfoRaw>) {
const tiles =
candidate.layer.usersParcels?.filter((value) => value[0] && value[1]).map((value) => `${value[0]},${value[1]}`) ??
[]
candidate.layer.usersParcels
// tslint:disable:strict-type-predicates
?.filter((value) => typeof value[0] !== 'undefined' && typeof value[1] !== 'undefined')
.map((value) => `${value[0]},${value[1]}`) ?? []

const scenesId = await fetchSceneIds(tiles)

Expand Down