Permalink
Browse files

ensure text values are strings

  • Loading branch information...
1 parent 772f8cb commit 9eb4d451c7e58d33a1d6e93d9e58faca93a4165a @iamnoah iamnoah committed with iamnoah Jun 18, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 live_handlebars.js
View
@@ -137,13 +137,13 @@ steal.plugins('mustache','common','jquery/lang','jquery/model').then(function($)
Handlebars.registerHelper('bindClass',function(ctx,options) {
return bindMany.call(this,ctx,options,function(el,condition,className) {
- el.toggleClass(className,!!condition);
+ el.toggleClass(""+className,!!condition);
});
});
Handlebars.registerHelper('bindHtml',function(attr,options) {
return bindOne.call(this,attr,options,function(el,html) {
- el.html(html);
+ el.html(""+html);
});
});
@@ -220,13 +220,13 @@ steal.plugins('mustache','common','jquery/lang','jquery/model').then(function($)
Handlebars.registerHelper('bindText',function(attr,options) {
return bindOne.call(this,attr,options,function(el,text) {
- el.text(text);
+ el.text(""+text);
});
});
Handlebars.registerHelper('bindVal',function(attr,options) {
return bindOne.call(this,attr,options,function(el,val) {
- el.val(val);
+ el.val(""+val);
});
});

0 comments on commit 9eb4d45

Please sign in to comment.