From 2bf6bc8e9ef6c7e051fe5daf9103f311d195a4ea Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 22 Feb 2023 21:34:01 +0200 Subject: [PATCH] fix for nan points --- src/structure/client/wrappers/UserWrapper.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/structure/client/wrappers/UserWrapper.js b/src/structure/client/wrappers/UserWrapper.js index 544ec88..79b7ecd 100644 --- a/src/structure/client/wrappers/UserWrapper.js +++ b/src/structure/client/wrappers/UserWrapper.js @@ -44,7 +44,10 @@ class UserWrapper { ); 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) { index.expirations.push({ points, expiration, id }); } else {