I have created a query for data using the WsapiDataStore request. When data is returned by the server, the loadPages call works just fine; but when there is not data fitting the filter criteria, the loadPages method seems to make an infinite number of requests to the server which I can see via the console. I tried checking for no data being returned and then using the clearListeners method to stop the request loop, but nothing seems to happen after the call is made. Is there a simple way to stop requesting for information if the first request returns no data?
Share
Looks like the clearListeners call had to be made on the actual loadPages object, not the store loader itself. The best way I’ve found to avoid the infinite loop problem is to structure the call like so: