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

Put templateName on the context instance instead of the context's globals. #328

Merged
merged 7 commits into from
Sep 3, 2013

Conversation

prashn64
Copy link
Contributor

Addresses Issue #327

// and do not continue to search for the rest of the path.
// Note: a falsey value at the end of a matched path also comes here.
// This returns the value or undefined if we just have a partial match.
if (i > 1) return ctx;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change related to the __template_name__ change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it looks like the dist wasn't made for this older change, but it's still part of dust.js in the repo

@brikis98
Copy link

I would suggest adding getCurrentTemplate and setCurrentTemplate functions to abstract away the underlying implementation. It would be better for helper/client/outside code to not directly access __template_name__ in case it changes in the future.

jimmyhchan added a commit that referenced this pull request Sep 3, 2013
Put templateName on the context instance instead of the context's globals.
@jimmyhchan jimmyhchan merged commit 72e8996 into linkedin:master Sep 3, 2013
jimmyhchan added a commit to jimmyhchan/dustjs that referenced this pull request Sep 9, 2013
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.

3 participants