I upgraded to Meteor 1.0, installed the latest iron router package, tried to run my application and received this nice warning in my console log:
Sending a route is never displayed. Did you forget to call this.next () on onBeforeAction?
So I tried to change my routes according to the new version.
this.route('gamePage', { path: '/game/:slug/', onBeforeAction: [function() { this.subscribe('singlePlayer', this.params.slug).wait(); var singlePlayer = this.data(); if (singlePlayer) { if (singlePlayer.upgrade) { this.subscribe('upgrades', this.params.slug).wait(); this.next(); } this.next(); } this.next(); }], data: function() { return Games.findOne({slug: this.params.slug}); }, waitOn: function() { return [Meteor.subscribe('singleGame', this.params.slug)]} });
How can i fix this? Any help would be greatly appreciated.
javascript meteor iron-router
user3475602
source share