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

Added global Mustache definition #466

Merged
merged 1 commit into from
Jun 17, 2015
Merged

Conversation

yousefcisco
Copy link
Contributor

The Mustache variable isn't defined globally which means the code doesn't work correctly when used in strict mode.

@bobthecow
Copy link

That was just removed by @nagaozen in 60c2da8. Y'all are going to have to fight it out ;)

@yousefcisco
Copy link
Contributor Author

It looks like the removal was so it would be compatible with eslint, this change thankfully doesn't cause any eslint errors and allows the code to be run in strict mode.

The reason behind this PR is because we bundle Mustache.js with a bunch of other libraries that we use on our sites and automatically add "use strict" to the top of the merged script so this was causing it all to fail.

@dasilvacontin
Copy link
Collaborator

Thanks for the commit reference @bobthecow, made it easy for figuring out @nagaozen's change was just for eslint compatibility.

I confirm this change doesn't raise any eslint errors.

@yousefcisco, thanks for the PR! I merge and release right now. :shipit:

dasilvacontin added a commit that referenced this pull request Jun 17, 2015
Added global Mustache definition
@dasilvacontin dasilvacontin merged commit b660592 into janl:master Jun 17, 2015
@phillipj
Copy link
Collaborator

#449 was the original source for the global being removed, not just to satisfy eslint

@yousefcisco
Copy link
Contributor Author

What causes the issue in ASP? Surely this would also be an issue with other libraries as this pattern is widely used.

@dasilvacontin
Copy link
Collaborator

Great, I misunderstood the commit message. I should have read the issue too.

I'm trying to figure out why the global way doesn't work in ASP. If you find anything, please post it here. /cc @nagaozen

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.

None yet

4 participants