Bläddra i källkod

Fix arrow function this ref

Lucas de Souza 5 år sedan
förälder
incheckning
a8fc30b133
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      js/assessment/ivprogAssessment.js

+ 1 - 1
js/assessment/ivprogAssessment.js

@@ -29,7 +29,7 @@ export class IVProgAssessment {
         return this.partialEvaluateTestCase(new IVProgProcessor(validTree), t.input, t.output, name);
         return this.partialEvaluateTestCase(new IVProgProcessor(validTree), t.input, t.output, name);
       });
       });
       const testResult = partialTests.reduce((acc, curr) => acc.then(curr), Promise.resolve(0));
       const testResult = partialTests.reduce((acc, curr) => acc.then(curr), Promise.resolve(0));
-      return testResult.then(total => {
+      return testResult.then(function (){
         const grade = total / this.testCases.length;
         const grade = total / this.testCases.length;
         const channel = grade == 1 ? DOMConsole.INFO : DOMConsole.ERR;
         const channel = grade == 1 ? DOMConsole.INFO : DOMConsole.ERR;
         this.writeToConsole(channel, StringTypes.MESSAGE, "test_suite_grade", grade * 100);
         this.writeToConsole(channel, StringTypes.MESSAGE, "test_suite_grade", grade * 100);