title: TypeError: inverse is not a function (in handlebars helper)
body: <p>I need a way to compare values in handlebars and found this helper on the web:</p>
  
  <pre><code>Handlebars.registerHelper('compare', function(lvalue, rvalue, options) {
  
      if (arguments.length &lt; 3)
          throw new Error("Handlerbars Helper 'compare' needs 2 parameters");
  
      var operator = options.hash.operator || "==";
  
      var operators = {
          '==':       function(l,r) { return l == r; },
          '===':      function(l,r) { return l === r; },
          '!=':       function(l,r) { return l != r; },
          '&lt;':        function(l,r) { return l &lt; r; },
          '&gt;':        function(l,r) { return l &gt; r; },
          '&lt;=':       function(l,r) { return l &lt;= r; },
          '&gt;=':       function(l,r) { return l &gt;= r; },
          'typeof':   function(l,r) { return typeof l == r; }
      }
  
      if (!operators[operator])
          throw new Error("Handlerbars Helper 'compare' doesn't know the operator "+operator);
  
      var result = operators[operator](lvalue,rvalue);
  
      if( result ) {
          return options.fn(this);
      } else {
          return options.inverse(this);
      }
  </code></pre>
  
  <p>This is how I use it:</p>
  
  <pre><code>{{#each numbers as |nr|}}
           {{#compare nr stars operator="&lt;=" }}
  
               &lt;span{{action "rate" }}  class="rating{{nr}} glyphicon glyphicon-star"&gt;&lt;/span&gt;
  
           {{/compare}}
  
  
         {{/each}}
  });
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>TypeError: options.inverse is not a function</p>
  </blockquote>