Просмотр исходного кода

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 лет назад
Родитель
Сommit
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


Загрузка…
Отмена
Сохранить