Browse Source

Fix #23 nullptr

isundil 6 years ago
parent
commit
aca1828d6d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      quizz.js

+ 1 - 1
quizz.js

@@ -424,7 +424,7 @@ QuizzBot.prototype.buildOverpassedMessage = function(username, diff) {
         exaequo = " est aux coude a coude avec " +diff.exaequo.map(i => i.name).join(", ");
     if (!diff.users || !diff.users.length)
         return exaequo ? (username +exaequo) : null;
-    exaequo = " et" +exaequo;
+    exaequo = exaequo ? (" et" +exaequo) : null;
     const rankStr = diff.newRank == 1 ? "1ere" : `${diff.newRank}eme`;
     if (diff.users.length > 1) // Advanced too much rank at once ! Only display new position
         return `${username} prend la ${rankStr} place ` +(exaequo || "!");