Closed lorensr closed 7 years ago
Not sure. Is this with Meteor 1.0.4+? We haven't tested and updated for the new Meteor release yet.
yep,
$ m --version
Meteor 1.0.4.2
@lorensr, I looked into this a bit and I can't reproduce, and all tests are passing with Meteor 1.0.4+. Can you link to a repo with a simple reproduction so we can figure out what's happening?
We do still need to update this pkg to play more nicely with the new onCreated/onRendered/onDestroyed, but I'm not sure if that's related to your issue.
I can't reproduce, it's a large app, and I'm just adding the package, not calling anything. Looks like it would be fixed by checking if view is undefined before accessing the name
Maybe something like this?
var i, name = parseName(template.viewName);
if (!name) {
if (template.view) {
name = parseName(template.view.name);
} else {
return;
}
}
var h = templateHooks[type][name];
@aldeed I get the same error I can reproduce it easily just try to invoke rendered Template.Name.rendered()
in console. It will not work.
That error occurs elsewhere in the package, but it does come from the same problem of template.view
being undefined
:
This happened to me when I was trying to send a data property called created
as an argument to a template helper:
<span class="date">{{datetime created}}</span>
It then tried to run the template hooks, but got the data object instead of the template instance.
Changing the property name or removing the parameter resolves this.
Wow. Thank you!!! Fixed it.
Before: {{days_ago created}}
After:
{{days_ago get_created}}
UI.registerHelper 'get_created', ->
@created
Closing. Pretty sure this was fixed awhile back.
When I add this package,
v3.4.3
, I get this error:I guess that means one of my templates doesn't have a view? I can't imagine why.