pull/266/merge
Dexter 9 years ago committed by GitHub
commit 08ea899d1f

@ -283,8 +283,8 @@ export default function dom ( parsed, source, options, names ) {
if ( templateProperties.onrender ) { if ( templateProperties.onrender ) {
builders.init.addBlock( deindent` builders.init.addBlock( deindent`
if ( options._root ) { if ( options._parent ) {
options._root._renderHooks.push({ fn: template.onrender, context: this }); options._parent._renderHooks.push({ fn: template.onrender, context: this });
} else { } else {
template.onrender.call( this ); template.onrender.call( this );
} }
@ -306,7 +306,7 @@ export default function dom ( parsed, source, options, names ) {
this._handlers = Object.create( null ); this._handlers = Object.create( null );
this._root = options._root; this._parent = options._parent;
this._yield = options._yield; this._yield = options._yield;
${builders.init} ${builders.init}

@ -56,7 +56,7 @@ export default {
const componentInitProperties = [ const componentInitProperties = [
`target: ${!isToplevel ? generator.current.target: 'null'}`, `target: ${!isToplevel ? generator.current.target: 'null'}`,
'_root: component._root || component' '_parent: component'
]; ];
// Component has children, put them in a separate {{yield}} block // Component has children, put them in a separate {{yield}} block

Loading…
Cancel
Save