Fixing onrenderhook chain

pull/266/head
Dexter 9 years ago
parent 8eb540db6d
commit 9c84c1318e
No known key found for this signature in database
GPG Key ID: B404EAED384C3FB9

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

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

Loading…
Cancel
Save