handlebars.java
handlebars.java copied to clipboard
Partials not working with non-map context objects
It appears that since v4.1.1, partial templates require the context to contain "size" and "empty" values. This is ok for Maps, but not for custom objects which don't contain these values. E.g. we use a custom ValueResolver, which resolves JSON data. But when using partials, the library throws a HandlebarsException, complaining that "size" doesn't exist in the data.
The problem affects versions 4.1.1 and 4.1.2. V4.1.0 works as expected.