Skip to content

@DATA not compiles to invalid JS in stringParams mode #699

@kpdecker

Description

@kpdecker
  it('should handle DATA', function() {
    var template = CompilerContext.compile('{{foo @bar}}', { stringParams: true });

    var helpers = {
      foo: function(bar, options) {
        console.log(options);
        equal(bar, 'bar');
        equal(options.types[0], 'DATA');
        return 'Foo!';
      }
    };

    var result = template({}, { helpers: helpers });
    equal(result, 'Foo!');
  });

Causes a compile error as there is no value passed in for the @bar parameter

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions