diff --git a/sqlite.js b/sqlite.js index fc54dbc..6612c15 100644 --- a/sqlite.js +++ b/sqlite.js @@ -103,7 +103,7 @@ module.exports = { let userInfo = await module.exports.getScores(user); // add user - if (!userInfo.length) { + if (!userInfo[0].length) { success = await db.run("INSERT INTO Scores (username, highscore, ip) VALUES (?, ?, ?);", [user, newScore, ip]); await db.run("INSERT INTO WeeklyScores (username, highscore, ip) VALUES (?, ?, ?);", [user, newScore, ip]);