Kaynağa Gözat

Save local reference to cache

tags/v1.0.0
Michael Jackson 12 yıl önce
ebeveyn
işleme
d56f23e769
1 değiştirilmiş dosya ile 5 ekleme ve 3 silme
  1. +5
    -3
      mustache.js

+ 5
- 3
mustache.js Dosyayı Görüntüle

@@ -358,9 +358,11 @@
* up the context hierarchy if the value is absent in this context's view.
*/
Context.prototype.lookup = function (name) {
var cache = this.cache;

var value;
if (name in this.cache) {
value = this.cache[name];
if (name in cache) {
value = cache[name];
} else {
var context = this, names, index;

@@ -382,7 +384,7 @@
context = context.parent;
}

this.cache[name] = value;
cache[name] = value;
}

if (isFunction(value))


Yükleniyor…
İptal
Kaydet