Преглед изворни кода

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 година
родитељ
комит
6382ec91e8
1 измењених фајлова са 1 додато и 1 уклоњено
  1. +1
    -1
      mustache.js

+ 1
- 1
mustache.js Прегледај датотеку

@@ -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


Loading…
Откажи
Сачувај