BorisMoore / jsrender

A lightweight, powerful and highly extensible templating engine. In the browser or on Node.js, with or without jQuery.
http://www.jsviews.com
MIT License
2.67k stars 339 forks source link

"Unknown template" error slightly broken with jQuery 3.0+ #305

Closed brobison75 closed 7 years ago

brobison75 commented 7 years ago

jsrender.js line 2151 (v0.9.82 web version):

    var tmplElem = this.jquery && (this[0] || error('Unknown template: "' + this.selector + '"')),

.selector has been removed as of jQuery 3.0. Test with "$('#nonexistent_tmpl').render();" using jQuery 3.0+. Console message under Chrome:

Uncaught JsViewsError {name: "JsRender Error", message: "Unknown template: "undefined""}

Obviously this is a minor issue, but worth pointing out.

BorisMoore commented 7 years ago

Yes, thanks for calling this out! I'll fix it in the next update.

BorisMoore commented 7 years ago

This has been fixed in commit v0.9.83