All that’s going on is a Router redirect by invoking Router.go
The application hangs somewhere it shouldn’t for a second (I’ll get to that in a bit), this gets spat out by my browser console:
Exception from Tracker recompute function:
debug.js:41 RangeError: Maximum call stack size exceeded
at String.match (native)
at Object.jQuery.event.remove (http://localhost:3000/packages/jquery.js?dd8bac56f8fd3666d433d2285ae01e52597cc51a:4460:27)
Here’s my router.js
var requireLogin = function() {
if (!Meteor.user()) {
this.render('hello');
} else {
this.next();
}
}
Router.onBeforeAction(requireLogin, {
except: ['hello']
});
Router.route('/', function() {
Router.go('/users/' + Meteor.userId());
});
Immediately after logging in, the last route is invoked. Following which the Stack Overflow occurs.
I think seeing the error pop would perhaps be the best way to diagnose, so if anyone would like to, here’s the staging site: http://yoke.meteor.com
Open your developer console, login with the username and password demo
, and sit back.
Any input as to how I could go about resolving this would be immense.
If anyone would like to see body of code itself, it’s here: http://github.com/alouis93/yoke