This website works better with JavaScript.
Home
Explore
Help
Sign In
jan
/
mustache.js
mirror of
https://github.com/janl/mustache.js
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
46
Wiki
Activity
Browse Source
Remove `typeof obj === 'object'` constraint in prop lookup
Allows rendering properties of primitive types that are not objects, such as a string.
pull/618/head
David da Silva
raymond.lam
9 years ago
parent
a51e1c22a1
commit
6382ec91e8
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
mustache.js
+ 1
- 1
mustache.js
View File
@@ -42,7 +42,7 @@
* including its prototype, has a given property
*/
function hasProperty (obj, propName) {
return obj != null &&
typeof obj === 'object' &&
(propName in obj);
return obj != null && (propName in obj);
}
// Workaround for https://issues.apache.org/jira/browse/COUCHDB-577
Write
Preview
Loading…
Cancel
Save