javascript - Meteor routing & rendering error -
getting strange error in meteor:
route dispatch never rendered. did forget call this.next() in onbeforeaction?
and none of content rendering when sign in. same codebase working on friend's machine macbook. works fine code when deploys pull code , deploy same code , throw same error. can see here http://streetscenestest.meteor.com/ , router.js below.
how can fix this? appreciated.
here's router.js:
router.configure({ layouttemplate: 'layout', }); router.route('/', function() { this.render('home'); }); router.route('/user/:_username', { name: 'user_profile', data: function() { return meteor.user();} }); router.route('/create', function() { this.render('createevent'); }); router.route('/insert', function() { this.render('insertevent'); }); router.route('/events/:name', { name: 'event', data: function() { return events.findone({name: this.params.name});} }); router.route('/useremail', function() { this.render('useremail'); }, { name: 'useremail' }); router._filters = { hascompletedprofile: function() { if(!this.ready()) return; var user = meteor.user(); if (user && ! userprofilecomplete(user)){ this.render('useremail'); } else { this.next(); } this.next(); }, }; filters = router._filters; router.onbeforeaction(filters.hascompletedprofile);
just says , call this.next()
:
router._filters = { hascompletedprofile: function() { if (this.ready()) { var user = meteor.user(); if (user && !userprofilecomplete(user)){ this.render('useremail'); } } this.next(); }, };
Comments
Post a Comment