remove TODO

pull/603/head
Rich Harris 7 years ago
parent 288d1c9d74
commit c4b68ca8cb

@ -192,7 +192,7 @@ export default function dom ( parsed: Parsed, source: string, options: CompileOp
${templateProperties.ondestroy && `${generator.alias( 'template' )}.ondestroy.call( this );`}
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -34,11 +34,6 @@ describe( 'js', () => {
const expected = fs.readFileSync( `${dir}/expected.js`, 'utf-8' );
const expectedBundle = fs.readFileSync( `${dir}/expected-bundle.js`, 'utf-8' );
assert.equal(
actual.trim().replace( /^\s+$/gm, '' ),
expected.trim().replace( /^\s+$/gm, '' )
);
return rollup({
entry: `${dir}/_actual.js`,
plugins: [{
@ -52,6 +47,11 @@ describe( 'js', () => {
const actualBundle = bundle.generate({ format: 'es' }).code;
fs.writeFileSync( `${dir}/_actual-bundle.js`, actualBundle );
assert.equal(
actual.trim().replace( /^\s+$/gm, '' ),
expected.trim().replace( /^\s+$/gm, '' )
);
assert.equal(
actualBundle.trim().replace( /^\s+$/gm, '' ),
expectedBundle.trim().replace( /^\s+$/gm, '' )

@ -205,7 +205,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -77,7 +77,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -167,7 +167,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -63,7 +63,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -298,7 +298,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -161,7 +161,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -195,7 +195,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -73,7 +73,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -237,7 +237,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -109,7 +109,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -214,7 +214,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -86,7 +86,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -193,7 +193,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -79,7 +79,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -164,7 +164,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
template.ondestroy.call( this );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -60,7 +60,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
template.ondestroy.call( this );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -373,7 +373,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

@ -245,7 +245,7 @@ SvelteComponent.prototype.teardown = SvelteComponent.prototype.destroy = functio
this.fire( 'destroy' );
if ( detach !== false ) this._fragment.unmount();
this._fragment.destroy( false ); // TODO no arguments to destroy
this._fragment.destroy();
this._fragment = null;
this._state = {};

Loading…
Cancel
Save