Handlebars.Net icon indicating copy to clipboard operation
Handlebars.Net copied to clipboard

Version 1.7.1 of nuget package introduces breaking change

Open czuroski opened this issue 10 years ago • 3 comments

I am running into a template compilation issue after moving to version 1.7.1 of the nuget package. The error is -

"Non-empty collection required\r\nParameter name: expressions"

Unfortunately, it is difficult to get any more detail with that. If this is not a known issue, then I can pull down the latest source next week and attempt to pinpoint the cause of the issue. Until then, I can roll back to 1.7.0 and everything works fine.

czuroski avatar Jun 17 '16 21:06 czuroski

Can you share the template and example data?

rexm avatar Jun 17 '16 22:06 rexm

Closing this due to inactivity; can reopen any time.

rexm avatar Aug 23 '16 16:08 rexm

I think I reproduced this and the cause was empty helper or conditional blocks: Fine on older Handlerbars.Net versions, throws the aforementioned exception on newer versions: {{#myhelper}}{{/myhelper}} {{#if}}{{else}}do this{{/if}} {{#ifmycondition}}{{else}}do this{{/ifmycondition}}

I'm not sure if empty blocks are allowed by Handlerbars.js, but I found that little bit of fault tolerance nice, and the exception message doesn't make it easy to track down what is wrong.

UniSnake avatar Mar 06 '18 23:03 UniSnake