fix: return 0 instead of null for missing user percentile data

This commit is contained in:
codytseng
2025-12-25 09:21:29 +08:00
parent 25b2831fcc
commit d964c7b7b3

View File

@@ -17,7 +17,7 @@ class FayanService {
return new Array(pubkeys.length).fill(null)
}
const data = await res.json()
return pubkeys.map((pubkey) => data[pubkey] ?? null)
return pubkeys.map((pubkey) => data[pubkey] ?? 0)
} catch {
return new Array(pubkeys.length).fill(null)
}