title: Handlebars custom if equals helper not compiling
body: <p>I've added a custom helper in Handlebars to accomplish an <code>if == "some string"</code> type helper. The helper code is this:</p>
  
  <pre><code>Handlebars.registerHelper('if_eq', function(a, b, opts) {
      if(a == b) // Or === depending on your needs
          return opts.fn(this);
      else
          return opts.inverse(this);
  });
  </code></pre>
  
  <p>The template is this:</p>
  
  <pre><code>&lt;div id="appStoreParametersModal" class="modal-dialog"&gt;
      &lt;div class="modal-content appStoreParametersModal"&gt;
          &lt;div class="modal-header hypersignModalHeader"&gt;
              &lt;h3&gt;{{appName}}&lt;/h3&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
              &lt;div id="app-params"&gt;
                  {{#each appParm}}
                  &lt;form&gt;
                      {{#if_eq uiControlType "text"}}
                      &lt;div class="form-group"&gt;
                          &lt;label for="{{qsName}}"&gt;{{uiName}}&lt;/label&gt;
                          &lt;input type="text" class="form-control" id="{{qsName}}" placeholder="{{uiName}}"/&gt;
                      &lt;/div&gt;
                      {{else if_eq uiControlType "dropdown"}}
                      &lt;div class="form-group"&gt;
                          &lt;label for="{{qsName}}"&gt;{{uiName}}&lt;/label&gt;
                          &lt;select class="form-control" id="{{qsName}}"&gt;
                              {{#each defaultVals}}
                                  &lt;option value="{{value}}"&gt;{{displayName}}&lt;/option&gt;
                              {{/each}}
                          &lt;/select&gt;
                      &lt;/div&gt;
                      {{/if_eq}}
                  &lt;/form&gt;
                  {{/each}}
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="modal-footer"&gt;
              &lt;button type="button" class="btn btn-warning cancel" data-dismiss="modal" id="cancel"&gt;Cancel&lt;/button&gt;
              &lt;button type="button" class="btn btn-success" id="appStoreNext"&gt;Next&lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm getting this error: </p>
  
  <blockquote>
    <p>Uncaught Error: if_eq doesn't match each</p>
  </blockquote>
  
  <p>It seems to be a problem with using the <code>{{else}}</code>, because if I only use the <code>if_eq</code> helper without an <code>else</code>, then it works fine. I'm pretty new to Handlebars, so I'm sure I'm missing something stupid.</p>