fix for nan points
This commit is contained in:
parent
98fad951fa
commit
2bf6bc8e9e
@ -44,7 +44,10 @@ class UserWrapper {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (find.length) {
|
if (find.length) {
|
||||||
for (const { points, expiration, id } of find) {
|
for (const { points: p, expiration, id } of find) {
|
||||||
|
let points = p;
|
||||||
|
// Imported cases may have false or null
|
||||||
|
if (typeof points !== 'number') points = 0;
|
||||||
if (expiration > 0) {
|
if (expiration > 0) {
|
||||||
index.expirations.push({ points, expiration, id });
|
index.expirations.push({ points, expiration, id });
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user