BorisMoore / jquery-tmpl

The original official jQuery Templates plugin. This project was maintained by the jQuery team as an official jQuery plugin. It is no longer in active development, and has been superseded by JsRender.
3.23k stars 1.01k forks source link

jquery.tmpl.js:432 - Result of expression 'pntItem.nodes' [undefined] is not an object #76

Closed edoloughlin closed 13 years ago

edoloughlin commented 13 years ago

I'm trying to use two levels of nested templates, passing arrays at each level. I get an error relating to pntItem.nodes (jquery.tmpl.js:431) being undefined in Safari and Chrome.

BorisMoore commented 13 years ago

See pull request and Issue 78. https://github.com/jquery/jquery-tmpl/issues/78

Thanks edoloughlin. But can you provide a complete sample test case of the issue. Sometimes people hit an error on that line of code as a result of a misunderstanding about how to use the .tmpl APIs, so I want to be sure I understand what is going on.

dotnetCarpenter commented 13 years ago

I just had a experience with the same error message. It turned out that I was building unclosed divs. E.g.

lorem ipsum as in no closing div. When utilizing nested templates, complicated logic ect. this can easily happen. If this is the issue, I don't think it should be fixed but a more descriptive error message would be appropriate. Cheers, Jon.

dotnetCarpenter commented 13 years ago

oops, lost the tags.

Lorem ipsum