mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Merge pull request #374 from azicchetti/master
Fixing a scope issue of the function returned by template()
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user