Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix behavior of Context#resolve when resolving a context function that returns a Chunk #622

Merged
merged 1 commit into from
Apr 14, 2015

Conversation

sethkinast
Copy link
Contributor

There's one edge case that context.resolve() didn't hit.

If you have a function in context (not a generated Dust body function) that returns a chunk, the chunk is not evaluated.

{#foo param="{func_returns_chunk} world"/} {! works because the whole string turns into a generated body function !}
{#foo param=func_that_returns_value /} {! works because the func doesn't return a Chunk !}
{#foo param=func_that_returns_chunk /} {! [object Object] !}

PR fixes this edge case.

@sethkinast
Copy link
Contributor Author

This must go in some version <= 2.7.0 so dustjs-helpers works.

@sethkinast sethkinast force-pushed the context-resolve-chunk branch from 89c1893 to 044f5d3 Compare April 9, 2015 14:43
@sethkinast sethkinast modified the milestone: 2.7 Apr 9, 2015
prashn64 added a commit that referenced this pull request Apr 14, 2015
Fix behavior of `Context#resolve` when resolving a context function that returns a Chunk
@prashn64 prashn64 merged commit 13807c8 into linkedin:master Apr 14, 2015
@sethkinast sethkinast deleted the context-resolve-chunk branch April 15, 2015 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants