Skip to content

Commit

Permalink
Free interval variable after clearInterval() (#84)
Browse files Browse the repository at this point in the history
Once interval is cleared, it cannot be created again. Useful when hot reloading.
  • Loading branch information
cinan authored and rgommezz committed Apr 25, 2018
1 parent c92e0a1 commit c6cce27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/checkConnectivityInterval.js
Expand Up @@ -14,5 +14,6 @@ export const setupConnectivityCheckInterval = (
export const clearConnectivityCheckInterval = () => {
if (interval) {
clearInterval(interval);
interval = null;
}
};

0 comments on commit c6cce27

Please sign in to comment.