Browse Source

adaptiveSetInterval fires the first request immediately if runNow is true, in 3 seconds otherwise.

pull/374/head
Pēteris Caune 5 years ago
parent
commit
5c8b5b7b63
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      static/js/adaptive-setinterval.js

+ 2
- 4
static/js/adaptive-setinterval.js View File

@ -40,8 +40,6 @@ function adaptiveSetInterval(fn, runNow) {
}
});
if (runNow) {
quota = 20;
scheduleRun();
}
quota = 20;
scheduledId = setTimeout(scheduleRun, runNow ? 1 : 3000);
}

Loading…
Cancel
Save