Skip to content

Commit

Permalink
Fixing auto refresh so multiple intervals arent running
Browse files Browse the repository at this point in the history
  • Loading branch information
steverobbins committed Dec 8, 2015
1 parent 7e27493 commit e635b64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<config>
<modules>
<Steverobbins_Redismanager>
<version>1.4.0</version>
<version>1.4.1</version>
</Steverobbins_Redismanager>
</modules>
<global>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ var redisForm;
var redismanagerRefresh;
$('redismanager-refresh-set').on('click', function() {
var interval = parseInt($('redismanager-refresh-interval').value);
if (!interval) {
clearInterval(redismanagerRefresh);
} else {
clearInterval(redismanagerRefresh);
if (interval) {
redisRefreshGrid();
redismanagerRefresh = setInterval(function() {
redisRefreshGrid();
Expand Down

0 comments on commit e635b64

Please sign in to comment.