Šī lapa labāk darbojas, ja pārlūkam ir iespējots JavaScript.
Sākums
Izpētīt
Palīdzība
Pierakstīties
jan
/
mustache.js
spogulis no
https://github.com/janl/mustache.js
Vērot
1
Pievienot zvaigznīti
0
Atdalīts
0
Kods
Problēmas
0
Laidieni
46
Vikivietne
Aktivitāte
Pārlūkot izejas kodu
Merge pull request
#461
from janl/fix/context-cache
Bugfix for view context cache
tags/v2.1.0
David da Silva Contín
pirms 11 gadiem
vecāks
e31a89a239
e801e842a7
revīzija
15e7016895
4 mainītis faili
ar
7 papildinājumiem
un
1 dzēšanām
Dalītais skats
Salīdzināšanas iespējas
Rādīt statistiku
Lejupielādēt ielāpa failu
Lejupielādēt izmaiņu failu
+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
Parādīt failu
@@ -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
Parādīt failu
@@ -0,0 +1,4 @@
({
valueOf: 'Avoids methods',
watch: 'in Object.prototype'
})
+ 1
- 0
test/_files/avoids_obj_prototype_in_view_cache.mustache
Parādīt failu
@@ -0,0 +1 @@
{{valueOf}} {{watch}}
+ 1
- 0
test/_files/avoids_obj_prototype_in_view_cache.txt
Parādīt failu
@@ -0,0 +1 @@
Avoids methods in Object.prototype
Rakstīt
Priekšskatītījums
Notiek ielāde…
Atcelt
Saglabāt