Bug in docs re: Tracker.Dependency

93 views
Skip to first unread message

Laran Evans

unread,
Feb 8, 2015, 2:32:18 PM2/8/15
to meteo...@googlegroups.com
http://docs.meteor.com/#/full/tracker_dependency

I believe that this code:
var weatherDep = new Tracker.Dependency;

... should be this instead:
var weatherDep = new Tracker.Dependency();

David Greenspan

unread,
Feb 8, 2015, 3:03:04 PM2/8/15
to meteo...@googlegroups.com
They are equivalent in JavaScript.  We don't usually omit the parentheses in Meteor code, though (I may be the only one who ever has) so it's arguably a style violation.
--
You received this message because you are subscribed to the Google Groups "meteor-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meteor-core...@googlegroups.com.
To post to this group, send email to meteo...@googlegroups.com.
Visit this group at http://groups.google.com/group/meteor-core.
To view this discussion on the web visit https://groups.google.com/d/msgid/meteor-core/904c3af3-156a-4762-9483-0acba1ba4437%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Laran Evans

unread,
Feb 8, 2015, 9:17:39 PM2/8/15
to meteo...@googlegroups.com
Thanks for the clarification. I thought the former was a reference to the constructor function itself while the latter actually invokes it. Thanks for the clarification!


On Sunday, February 8, 2015 at 12:03:04 PM UTC-8, David Greenspan wrote:
They are equivalent in JavaScript.  We don't usually omit the parentheses in Meteor code, though (I may be the only one who ever has) so it's arguably a style violation.
http://docs.meteor.com/#/full/tracker_dependency

I believe that this code:
var weatherDep = new Tracker.Dependency;

... should be this instead:
var weatherDep = new Tracker.Dependency();

--
You received this message because you are subscribed to the Google Groups "meteor-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meteor-core+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages