Procházet zdrojové kódy

Mettre à jour 'quizz.js'

isundil před 6 roky
rodič
revize
ad96a4aa1d
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      quizz.js

+ 1 - 1
quizz.js

@@ -46,7 +46,7 @@ String.prototype.isWord = function() {
 Question.prototype.getQuestionType = function() {
     if (this.isBoolean())
         return QuestionType.bool;
-    if ((/^[0-9]+$/).exec(this.response))
+    if ((/^-?[0-9]+$/).exec(this.response))
         return QuestionType.number;
     return QuestionType.string;
 }