mirror of
https://github.com/marko-js/marko.git
synced 2026-02-01 16:07:13 +00:00
add out.global.template to all render functions
This commit is contained in:
parent
2afd1837f9
commit
fabaddeffe
@ -13,6 +13,8 @@ module.exports = function(target, renderer) {
|
||||
var render = renderFunc || this._;
|
||||
var out = createOut(localData.$global);
|
||||
|
||||
out.global.template = this;
|
||||
|
||||
if (callback) {
|
||||
out.on('finish', function() {
|
||||
callback(null, out.toString(), out);
|
||||
@ -34,6 +36,8 @@ module.exports = function(target, renderer) {
|
||||
var out = createOut(localData.$global);
|
||||
out.sync();
|
||||
|
||||
out.global.template = this;
|
||||
|
||||
render(localData, out);
|
||||
return out.$__getResult();
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user