FlowRouter > How to cancel render of Template when start redirect?

onRendered executed anyway:

  onCreated: ->
    route = FlowRouter.getParam('user')
    @user = findUser(route)
    FlowRouter.go('notFound') if not @user
  onRendered: ->
    $('#userName').text(@user.name)

GitHub Issue

Help me please! :slight_smile:

IronRouter does not have this problem. console.log('onRendered'); does not call in this test:

Template.login.onCreated(function() {
	console.log('onCreated');
	Router.go('/restore-password');
});

Template.login.onRendered(function() {
	console.log('onRendered');
});

Oh-oh-oh, related issues: