소스 검색

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();
         }
       }