canjs / can-stache

Live binding handlebars templates
https://canjs.com/doc/can-stache.html
MIT License
10 stars 13 forks source link

options.context missing in helper options #730

Open bmomberger-bitovi opened 2 years ago

bmomberger-bitovi commented 2 years ago

How often can you reproduce it?

Description:

https://canjs.com/doc/can-stache.helperOptions.html specifies that the helperOptions object passed into stache helpers should have a context property whose value is the current context when the stache is executed. However, this property is missing from all stache helper executions.

Underlying Reason:

The context property on HelperOptions is defined as a lazy value. Lazy values are always defined as non-enumerable, so when the core helperOptions object is cloned using can-assign before the helper execution, the context property is not assigned to the clone.

Environment:

Software Version
can-stache version 5.1.1
Browser Chrome
Operating system Mac OS Catalina