Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1739] 🐛 Fix infinite loop for search page filters #762

Merged
merged 1 commit into from
Sep 17, 2023

Conversation

jiromaykin
Copy link
Contributor

@jiromaykin jiromaykin commented Sep 11, 2023

https://taiga.maykinmedia.nl/project/open-inwoner/issue/1739

  • Preferably use 'let 'instead of 'var' for scope
  • Replaced setInterval with setTimeout to avoid continuous looping. Code inside setTimeout will execute once after the specified delay (250 milliseconds)
  • Setting timerId to null instead of zero is a common practice in JavaScript when using variables to represent timers or intervals + makes it clear that the timerId variable is not currently associated with any active timer - a way to indicate that there is no ongoing timer operation.

@jiromaykin jiromaykin changed the title 🐛 [#1739] Fix infinite loop for search page filters [#1739] 🐛 Fix infinite loop for search page filters Sep 11, 2023
@jiromaykin jiromaykin force-pushed the fix/1739-fix-infinite-loop-search-filters branch 3 times, most recently from 40e79db to 4d6779a Compare September 11, 2023 13:57
@jiromaykin jiromaykin marked this pull request as ready for review September 11, 2023 14:00
@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2023

Codecov Report

Merging #762 (a02461b) into develop (defa012) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #762   +/-   ##
========================================
  Coverage    93.58%   93.58%           
========================================
  Files          697      697           
  Lines        24595    24595           
========================================
  Hits         23016    23016           
  Misses        1579     1579           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@Bartvaderkin Bartvaderkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, an interval.. 😕 🤷

Copy link
Contributor

@pi-sigma pi-sigma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code comment is misleading, other than that looks fine.

@jiromaykin jiromaykin force-pushed the fix/1739-fix-infinite-loop-search-filters branch from 6d1ac3c to b62d4c5 Compare September 12, 2023 15:15
@jiromaykin jiromaykin requested a review from pi-sigma September 12, 2023 15:17
@alextreme alextreme merged commit 8adfa7e into develop Sep 17, 2023
@alextreme alextreme deleted the fix/1739-fix-infinite-loop-search-filters branch September 17, 2023 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants