ShiroYuki
ShiroYuki
Handlebars looping through getters
Hello, I'm trying to loop through and objects property including its getter, but since Handlebars 4.6.0 this is not allowed unless allowedProtoMethods is set to true (https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access). How/where can I set that option? For context I have a nested object to represent ability scores and accessing deeper sub stats with getters, and to list out the ability scores I'm looping through them. I can always output them each individually, but have a loop to do this would be ideal.
4 replies