Tämä sivusto toimii paremmin JavaScriptillä.
Etusivu
Tutki
Apua
Kirjaudu sisään
jan
/
mustache.js
peilaus alkaen
https://github.com/janl/mustache.js
Tarkkaile
1
Äänestä
0
Fork
0
Koodi
Ongelmat
0
Julkaisut
46
Wiki
Activity
Selaa lähdekoodia
Add support for resolving template functions using object prototype instead of current view object
pull/514/head
Brook Zhou
10 vuotta sitten
vanhempi
c31df4bb9f
commit
b5fffe9c1e
1 muutettua tiedostoa
jossa
7 lisäystä
ja
2 poistoa
Jaettu näkymä
Diff Options
Show Stats
Download Patch File
Download Diff File
+7
-2
mustache.js
+ 7
- 2
mustache.js
Näytä tiedosto
@@ -414,8 +414,13 @@
cache[name] = value;
}
if (isFunction(value))
value = value.call(this.view);
if (isFunction(value)){
if (names && names.length > 1 && typeof Object.getPrototypeOf(names[names.length-2])[names[names.length-1]] === 'function'){
value = value.call(names[names.length-2]);
} else {
value = value.call(this.view);
}
}
return value;
};
Write
Preview
Loading…
Peruuta
Tallenna