handlebars.java icon indicating copy to clipboard operation
handlebars.java copied to clipboard

Partials not working with non-map context objects

Open jByrneSpringer opened this issue 4 years ago • 0 comments

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.

jByrneSpringer avatar Nov 19 '19 14:11 jByrneSpringer