Преглед изворни кода

Don't create [view] every time

tags/0.5.0-vsc
thegrandpoobah пре 15 година
родитељ
комит
a0f372774b
1 измењених фајлова са 2 додато и 2 уклоњено
  1. +2
    -2
      mustache.js

+ 2
- 2
mustache.js Прегледај датотеку

@@ -921,13 +921,13 @@ var Mustache = function() {
renderer.render(template, {}, p); renderer.render(template, {}, p);


return function(view, send_func) { return function(view, send_func) {
view = view || {};
view = [view || {}];
var o = send_func ? undefined : []; var o = send_func ? undefined : [];
var s = send_func || function(output) { o.push(output); }; var s = send_func || function(output) { o.push(output); };
for (var i=0,n=commands.length; i<n; ++i) { for (var i=0,n=commands.length; i<n; ++i) {
commands[i]([view], s);
commands[i](view, s);
} }
if (!send_func) { if (!send_func) {


Loading…
Откажи
Сачувај