Before filing issues, please check the following points first:
This will probably help you to get a solution faster.
For bugs, it would be great to have a PR with a failing test-case.
I have been trying the example from the docs calling String.prototype.trim to work, but it does not seem to return the desired result (https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access).
https://jsfiddle.net/3yahoj1d/
Can anyone explain why the result prints as [object Object] to the console when typeof result returns string, or how to get the example to work?
I have also asked this on StackOverflow (https://stackoverflow.com/q/67416982/5115898) so feel free to close this issue if this is not a problem with handlebars itself.
Before filing issues, please check the following points first:
This will probably help you to get a solution faster.
For bugs, it would be great to have a PR with a failing test-case.
I have been trying the example from the docs calling
String.prototype.trimto work, but it does not seem to return the desired result (https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access).https://jsfiddle.net/3yahoj1d/
Can anyone explain why the result prints as
[object Object]to the console whentypeof resultreturnsstring, or how to get the example to work?I have also asked this on StackOverflow (https://stackoverflow.com/q/67416982/5115898) so feel free to close this issue if this is not a problem with handlebars itself.