Explorar el Código

Fixed bug with async and cancelation

Andrew Kane hace 8 años
padre
commit
fe844c10a4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);
       data.blazer = response;
       setTimeout( function () {
-        if (runningQuery && !runningQuery.canceled) {
+        if (!(runningQuery && runningQuery.canceled)) {
           runQuery(data, success, error, runningQuery);
         }
       }, 1000);