DiscoverMeteor / book

17 stars 0 forks source link

Chapter 17 - Error in Book - not consistent with GitHub #377

Closed Nexus7 closed 10 years ago

Nexus7 commented 10 years ago

In Chapter 17 the book says to add the subscription to currentUser in the router.js:

Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', waitOn: function() { Meteor.subscribe('currentUser'),
return [Meteor.subscribe('notifications')] } });

However this code results in errors and the correct code (as in GitHub) should be :

Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', waitOn: function() { return [ Meteor.subscribe('currentUser'), Meteor.subscribe('notifications') ] } });

SachaG commented 10 years ago

Thanks!