Skip to content

Commit

Permalink
Bug fix for case when calling $.template( null )
Browse files Browse the repository at this point in the history
  • Loading branch information
BorisMoore committed Sep 20, 2010
1 parent 71706af commit b25ce33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.tmpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@
return typeof name === "string" ? (jQuery.template[name] = tmpl) : tmpl;
}
// Return named compiled template
return typeof name !== "string" ? jQuery.template( null, name ):
return name ? (typeof name !== "string" ? jQuery.template( null, name ):
(jQuery.template[name] ||
// If not in map, treat as a selector. (If integrated with core, use quickExpr.exec)
jQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )));
jQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )))) : null;
},

encode: function( text ) {
Expand Down

0 comments on commit b25ce33

Please sign in to comment.