Skip to content

Commit

Permalink
High CPU usage when refresh is disabled (Fixes #81)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Jul 16, 2021
1 parent ecb5e02 commit 7ffce2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flask_moment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def include_moment(version=default_moment_version, local_js=None,
moments.forEach(function(moment) {{
flask_moment_render(moment);
const refresh = moment.dataset.refresh;
if (refresh) {{
if (refresh && refresh > 0) {{
(function(elem, interval) {{
setInterval(function() {{
flask_moment_render(elem);
Expand Down

0 comments on commit 7ffce2f

Please sign in to comment.