Describe the bug
Calling .length on string data in a template throws HandlebarsUndefinedBindingException (or returns an empty string).
Expected behavior:
Calling .length on string data outputs the length of that string, as it does in HandlebarsJS.
Test to reproduce
[Fact]publicvoidStringLength(){varhandlebars=Handlebars.Create();varrender=handlebars.Compile("{{str.length}}");objectdata=new{str="string"};varactual=render(data);Assert.Equal("6",actual);}Other related info
This feature previously worked. I discovered the current problem when attempting to upgrade from 1.11.5.0 to 2.0.8.0.
Describe the bug
Calling
.lengthon string data in a template throwsHandlebarsUndefinedBindingException(or returns an empty string).Expected behavior:
Calling
.lengthon string data outputs the length of that string, as it does in HandlebarsJS.Test to reproduce
Other related info
This feature previously worked. I discovered the current problem when attempting to upgrade from
1.11.5.0to2.0.8.0.