From e9516abffd4d5526c314ea9881c047b4bd969342 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 16 Jun 2017 10:47:19 -0400 Subject: [PATCH] fix bad indentation in generated code --- src/generators/dom/visitors/IfBlock.ts | 8 ++------ test/js/samples/if-block-no-update/expected-bundle.js | 8 ++------ test/js/samples/if-block-no-update/expected.js | 8 ++------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/generators/dom/visitors/IfBlock.ts b/src/generators/dom/visitors/IfBlock.ts index 16f0ce795b..e36c5d9984 100644 --- a/src/generators/dom/visitors/IfBlock.ts +++ b/src/generators/dom/visitors/IfBlock.ts @@ -272,15 +272,11 @@ function compound( } block.builders.unmount.addLine( - `${if_name}{ - ${name}.unmount(); - }` + `${if_name}${name}.unmount();` ); block.builders.destroy.addLine( - `${if_name}{ - ${name}.destroy(); - }` + `${if_name}${name}.destroy();` ); } diff --git a/test/js/samples/if-block-no-update/expected-bundle.js b/test/js/samples/if-block-no-update/expected-bundle.js index b1c908a8da..3177df9b02 100644 --- a/test/js/samples/if-block-no-update/expected-bundle.js +++ b/test/js/samples/if-block-no-update/expected-bundle.js @@ -164,16 +164,12 @@ function create_main_fragment ( state, component ) { }, unmount: function () { - { - if_block.unmount(); - } + if_block.unmount(); detachNode( if_block_anchor ); }, destroy: function () { - { - if_block.destroy(); - } + if_block.destroy(); } }; } diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js index 63f272f1d1..ac25a686c6 100644 --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -29,16 +29,12 @@ function create_main_fragment ( state, component ) { }, unmount: function () { - { - if_block.unmount(); - } + if_block.unmount(); detachNode( if_block_anchor ); }, destroy: function () { - { - if_block.destroy(); - } + if_block.destroy(); } }; }