Fixed a scope issue with the returned template function

This commit is contained in:
Andrea Zicchetti
2011-11-18 17:12:53 +01:00
parent 8c346141dc
commit 5e7d75d6f6

View File

@@ -915,7 +915,7 @@
.replace(/\t/g, '\\t') .replace(/\t/g, '\\t')
+ "');}return __p.join('');"; + "');}return __p.join('');";
var func = new Function('obj', '_', tmpl); var func = new Function('obj', '_', tmpl);
return data ? func(data, _) : function(data) { return func(data, _) }; return data ? func(data, _) : function(data) { return func.call(this,data, _) };
}; };
// The OOP Wrapper // The OOP Wrapper