fix for #1522... maybe?

pull/1530/head
Rich Harris 7 years ago
parent e087d08880
commit aebafcc975

@ -222,11 +222,12 @@ export default function dom(
${compiler.slots.size && `this.slots = {};`}
${templateProperties.onstate && `%onstate.call(this, { changed: @assignTrue({}, this._state), current: this._state });`}
this._fragment = @create_main_fragment(this, this._state);
${hasInitHooks && deindent`
this.root._oncreate.push(() => {
${templateProperties.onstate && `%onstate.call(this, { changed: @assignTrue({}, this._state), current: this._state });`}
${templateProperties.oncreate && `%oncreate.call(this);`}
this.fire("update", { changed: @assignTrue({}, this._state), current: this._state });
});

@ -10,5 +10,7 @@ export default {
'oncreate',
'onupdate'
]);
order.length = 0;
}
};

Loading…
Cancel
Save