1

Here is the error:
registerBoundHelper-generated helpers do not support use with Handlebars blocks.

The error is displayed once for every time I use the isEqual helper described below. Everything still seems to work just fine, but it throws lots of errors.

I'm using a helper function based on this SO question to test equality: Logical operator in a handlebars.js {{#if}} conditional

This is all that is in my application template:

{{#isEqual 'foo' value='bar'}}
  equal
{{else}}
  not equal
{{/isEqual}}

Here is the helper function:

Em.Handlebars.helper 'isEqual', (value, options) ->
  if value == options.hash.value
    options.fn(this)
  else
    options.inverse(this)
4

0 回答 0