Skip to content

Commit 533be69

Browse files
committed
Use better variable name
1 parent a97820f commit 533be69

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/handlebars/base.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,19 +129,19 @@ Handlebars.registerHelper('each', function(context, options) {
129129
return ret;
130130
});
131131

132-
Handlebars.registerHelper('if', function(context, options) {
133-
var type = toString.call(context);
134-
if(type === functionType) { context = context.call(this); }
132+
Handlebars.registerHelper('if', function(conditional, options) {
133+
var type = toString.call(conditional);
134+
if(type === functionType) { conditional = conditional.call(this); }
135135

136-
if(!context || Handlebars.Utils.isEmpty(context)) {
136+
if(!conditional || Handlebars.Utils.isEmpty(conditional)) {
137137
return options.inverse(this);
138138
} else {
139139
return options.fn(this);
140140
}
141141
});
142142

143-
Handlebars.registerHelper('unless', function(context, options) {
144-
return Handlebars.helpers['if'].call(this, context, {fn: options.inverse, inverse: options.fn});
143+
Handlebars.registerHelper('unless', function(conditional, options) {
144+
return Handlebars.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn});
145145
});
146146

147147
Handlebars.registerHelper('with', function(context, options) {

0 commit comments

Comments
 (0)