diff --git a/compiler/generate/index.js b/compiler/generate/index.js index b2fa544450..431b4213d6 100644 --- a/compiler/generate/index.js +++ b/compiler/generate/index.js @@ -621,8 +621,6 @@ export default function generate ( parsed, template ) { ${templateProperties.onteardown ? `template.onteardown.call( component );` : ``} }; - ${templateProperties.oninit ? `template.oninit.call( component );` : ``} - let mainFragment = renderMainFragment( component, options.target ); component.set( ${templateProperties.data ? `Object.assign( template.data(), options.data )` : `options.data`} ); diff --git a/test/compiler/lifecycle-events/_config.js b/test/compiler/lifecycle-events/_config.js index ae13dd2e2c..4e9c18ed70 100644 --- a/test/compiler/lifecycle-events/_config.js +++ b/test/compiler/lifecycle-events/_config.js @@ -2,8 +2,8 @@ import * as assert from 'assert'; export default { test ( component ) { - assert.deepEqual( component.events, [ 'init', 'render' ]); + assert.deepEqual( component.events, [ 'render' ]); component.teardown(); - assert.deepEqual( component.events, [ 'init', 'render', 'teardown' ]); + assert.deepEqual( component.events, [ 'render', 'teardown' ]); } }; diff --git a/test/compiler/lifecycle-events/main.svelte b/test/compiler/lifecycle-events/main.svelte index dc56c8e27a..e0a18d15ef 100644 --- a/test/compiler/lifecycle-events/main.svelte +++ b/test/compiler/lifecycle-events/main.svelte @@ -2,12 +2,8 @@