-
Notifications
You must be signed in to change notification settings - Fork 95
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
Multiple routes trigger first one to fire multiple times #30
Comments
It seems that this happens in -latest Firefox (v31.0) works fine in Opera |
By coincidence I also noticed this today. Looking at the source the way to do it is to call routie once, passing in an object if there are multiple routes.
Would it be possible to make this clearer in the docs? Perhaps Routie could also print a console warning stating that init should only be called once? Otherwise it is a great product, and I use it often. Thank you for developing it. |
Doesn't work for me, I need routing in multiple modules... |
I'm having this problem too, I'm on chrome, and the first time it loads it tries to execute 3 times. |
I need to declare each one in the index of each module. update: |
I have opened a pull request that fixes this issue. #47 |
@NicholasEymann Thanks! I'll take a look at it soon and get back to you in the actual pull request. |
I have a following code:
routie('search/:text', function(text) { ... });
routie('view-group/:id', function(id) { ... });
routie('view-test1/:id', function(id) { ... });
routie('view-test2/:id', function(id) { ... });
When reloading a page, first handler ('search/:text') when route is matched is fired 4 times, for each route declared. If I remove view-test1 and view-test2, it is fired 2 times.
Is this a serious bug?
The text was updated successfully, but these errors were encountered: