handlebars-lang / handlebars-lang/handlebars.js
Bizarre context resolution when parent context is block params
- Dominant language
- JavaScript
- Stars
- 18.7k
- Forks
- 2.1k
- PR merge metrics
- No merged PRs in 30d
Description
Sample fiddle: https://jsfiddle.net/wcoshgaL/4/
I have a helper that sets `value=omg` in context and `value=1` in block params. The template correctly renders the value from the block params.
Inside that, I call a second helper that sets `value=bar` in normal context.
I would expect `value` to be `bar` here since that is in the current context. However, it seems to pull the value out of the parent block param context instead....
Contributor guide
Research direction
Reproduce the context-resolution behavior using the linked JSFiddle, focusing on nested helpers, normal context, and block parameters. The issue is resolved when the inner helper's normal context value (`bar`) is selected instead of the parent block parameter value (`1`).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- handlebars, javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100