mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-09 15:15:58 +08:00
missing null/undefined checks
This commit is contained in:
parent
0ec199ce03
commit
50c441bee5
1 changed files with 6 additions and 1 deletions
|
@ -372,7 +372,12 @@ exports.testCompleted = functions.https.onCall((request, response) => {
|
|||
request.obj
|
||||
)}`
|
||||
);
|
||||
if (obj.mode === "time" && String(obj.mode2) === "60") {
|
||||
if (
|
||||
obj.mode === "time" &&
|
||||
String(obj.mode2) === "60" &&
|
||||
userdata.discordId !== null &&
|
||||
userdata.discordId !== undefined
|
||||
) {
|
||||
let besttime60 = 0;
|
||||
try {
|
||||
userdata.personalBests.time[60].forEach((result) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue