Hi there ! I’m a meteor newbie and I need some insight on what I’m doing wrong here.
I’ll explain what the app does and then post the code.
First, we input an address that is geocoded in a method. The result is then sent through a subscription to a publication.
In the publication, it finds all the office branches, sorted from nearest to farthest.
The result is sent to a reactivevar and to the template.
While in the page, if I make another input, nothing happens. In the publication, if I put a console.log at the end, I can see that the first request will fire the publication but then it won’t. If an error is thrown out (from methods.js), the list will dissapear and I can make another search. So I suspect that the subscription needs to stop().
Edit : I removed the code since it was completely changed thanks to waldgeist and I don’t people to misuse the bad code.