twitter / hogan.js

A compiler for the Mustache templating language
http://twitter.github.io/hogan.js
Apache License 2.0
5.14k stars 431 forks source link

Adding hasOwnProperty check to stop lookup on the prototype #209

Open serahhh opened 9 years ago

serahhh commented 9 years ago

I had a key called 'values' in my data object but findInScope was finding Array.prototype.values, causing my template to not render properly. See jsfiddle: http://jsfiddle.net/h8v2goby/

Added a hasOwnProperty check to fix this.

CLAassistant commented 5 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Sarah Hayman seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.