Sending a meteorite route has never been a warning

For the route:

Router.route('/logout', function(){
    var self = this;
    Meteor.logout(function(err) {
        if (err) {
            console.log('Error loggin out!');
        }
        self.redirect('/');
    });
});

I get this warning:

Route dispatch never rendered. Did you forget to call this.next() in an onBeforeAction?

What is a problem?

+4
source share
1 answer

It may take time to register a user. During this you will need a template. A route cannot exist without a template with an iron router. Or at least the iron router is not designed to work without it.

Your html:

<template name="logout">
    Logging you out. Please wait...
</template>

Your route:

Router.route('/logout', function(){
    Meteor.logout(function(err) {
        if (err) console.log('Error loggin out!');
        Router.go("/")
    });

    this.render("logout"):
});
+3
source

All Articles