Преглед изворни кода

no yoda

usually, '10 === finished' would be considered yoda
but in this case, with this naming of variables
it makes a lot more sense this way
jomo пре 10 година
родитељ
комит
bb4de15ff2
1 измењених фајлова са 1 додато и 2 уклоњено
  1. 1 2
      test/test.js

+ 1 - 2
test/test.js

@@ -311,8 +311,7 @@ describe("Crafatar", function() {
       var finished = 0;
       function partDone() {
         finished++;
-        if (finished === requests) {
-          // all requests have finished
+        if (requests === finished) {
           done();
         }
       }