Skip to content
Browse files

Fixed 'unless' functions

  • Loading branch information...
1 parent 87d91be commit 43afdab6f10d0e02f87ad2b08a056370d81a449c Eric Trinh committed Jul 23, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 helpers.js
View
10 helpers.js
@@ -22,7 +22,7 @@ Handlebars.registerHelper('if_eq', function(context, options) {
*/
Handlebars.registerHelper('unless_eq', function(context, options) {
if (context == options.hash.compare)
- return options.unless(this);
+ return options.inverse(this);
return options.fn(this);
});
@@ -43,7 +43,7 @@ Handlebars.registerHelper('if_gt', function(context, options) {
*/
Handlebars.registerHelper('unless_gt', function(context, options) {
if (context > options.hash.compare)
- return options.unless(this);
+ return options.inverse(this);
return options.fn(this);
});
@@ -64,7 +64,7 @@ Handlebars.registerHelper('if_lt', function(context, options) {
*/
Handlebars.registerHelper('unless_lt', function(context, options) {
if (context < options.hash.compare)
- return options.unless(this);
+ return options.inverse(this);
return options.fn(this);
});
@@ -85,7 +85,7 @@ Handlebars.registerHelper('if_gteq', function(context, options) {
*/
Handlebars.registerHelper('unless_gteq', function(context, options) {
if (context >= options.hash.compare)
- return options.unless(this);
+ return options.inverse(this);
return options.fn(this);
});
@@ -106,7 +106,7 @@ Handlebars.registerHelper('if_lteq', function(context, options) {
*/
Handlebars.registerHelper('unless_lteq', function(context, options) {
if (context <= options.hash.compare)
- return options.unless(this);
+ return options.inverse(this);
return options.fn(this);
});

0 comments on commit 43afdab

Please sign in to comment.
Something went wrong with that request. Please try again.