Пожалуйста, включите JavaScript.
Главная
Обзор
Помощь
Вход
jan
/
mustache.js
зеркало из
https://github.com/janl/mustache.js
Следить
1
В избранное
0
Форкнуть
0
Код
Задачи
0
Релизы
46
Вики
Активность
Просмотр исходного кода
Bugfix for view context cache picking methods from Object.prototype instead of the view.
Fixes
#442
tags/v2.1.0
Phillip Johnsen
11 лет назад
Родитель
e31a89a239
Сommit
e801e842a7
4 измененных файлов
:
7 добавлений
и
1 удалений
Разделённый вид
Опции Diff
Показать статистику
Скачать Patch файл
Скачать Diff файл
+1
-1
mustache.js
+4
-0
test/_files/avoids_obj_prototype_in_view_cache.js
+1
-0
test/_files/avoids_obj_prototype_in_view_cache.mustache
+1
-0
test/_files/avoids_obj_prototype_in_view_cache.txt
+ 1
- 1
mustache.js
Просмотреть файл
@@ -356,7 +356,7 @@
var cache = this.cache;
var value;
if (
name in cache
) {
if (
cache.hasOwnProperty(name)
) {
value = cache[name];
} else {
var context = this, names, index, lookupHit = false;
+ 4
- 0
test/_files/avoids_obj_prototype_in_view_cache.js
Просмотреть файл
@@ -0,0 +1,4 @@
({
valueOf: 'Avoids methods',
watch: 'in Object.prototype'
})
+ 1
- 0
test/_files/avoids_obj_prototype_in_view_cache.mustache
Просмотреть файл
@@ -0,0 +1 @@
{{valueOf}} {{watch}}
+ 1
- 0
test/_files/avoids_obj_prototype_in_view_cache.txt
Просмотреть файл
@@ -0,0 +1 @@
Avoids methods in Object.prototype
Редактирование
Предпросмотр
Загрузка…
Отмена
Сохранить