Browse Source

Fixed bug with async and cancelation

Andrew Kane 8 years ago
parent
commit
fe844c10a4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/assets/javascripts/blazer/application.js

+ 1 - 1
app/assets/javascripts/blazer/application.js

@@ -44,7 +44,7 @@ function runQuery(data, success, error, runningQuery) {
       var response = $.parseJSON(d);
       var response = $.parseJSON(d);
       data.blazer = response;
       data.blazer = response;
       setTimeout( function () {
       setTimeout( function () {
-        if (runningQuery && !runningQuery.canceled) {
+        if (!(runningQuery && runningQuery.canceled)) {
           runQuery(data, success, error, runningQuery);
           runQuery(data, success, error, runningQuery);
         }
         }
       }, 1000);
       }, 1000);