Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve teardown code by unifying detach branches #110

Merged
merged 1 commit into from
Dec 5, 2016

Conversation

mrkishi
Copy link
Member

@mrkishi mrkishi commented Dec 4, 2016

This PR groups detach statements into a single if branch.

Note that I haven't modified the teardown template to deal with empty lists: you can end up with extra newlines and an empty if in those cases. Should that be left for minifiers or should we handle them?

Closes #99.

@codecov-io
Copy link

codecov-io commented Dec 4, 2016

Current coverage is 90.86% (diff: 100%)

Merging #110 into master will increase coverage by <.01%

@@             master       #110   diff @@
==========================================
  Files            48         48          
  Lines          1324       1325     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           1203       1204     +1   
  Misses          121        121          
  Partials          0          0          

Powered by Codecov. Last update 5770048...119ad14

@Rich-Harris Rich-Harris merged commit 6f2ce42 into sveltejs:master Dec 5, 2016
@Rich-Harris
Copy link
Member

Much better, thank you!

Should that be left for minifiers or should we handle them?

I think Svelte should handle it, if only for the sake of readability. There's a few places throughout Svelte where the generated code could be tidied up a bit – probably not too high a priority though

Rich-Harris added a commit that referenced this pull request Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants