Running query after switching page

Hi everyoneđź‘‹

I have an issue with my app where I poll data using a JavaScript query every 10 seconds on an overview page.

The problem occurs when I navigate to another page while the JavaScript query is still waiting for the 10-second interval to complete. This triggers an error stating that the query is out of scope.

out of scope error

Here's what I've tried so far:

  1. Resetting and clearing the JavaScript query before navigating to another page.
  2. Disabling error notifications for the JavaScript query.

Unfortunately, this didn't work. Any advice on how to properly handle this scenario or prevent the error would be greatly appreciated!

1 Like