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

Don't generate code for a non-updating if block #3478

Merged
merged 6 commits into from
Sep 4, 2019
Merged

Conversation

Rich-Harris
Copy link
Member

Follow-up to #3452, fixes #3447. Marking WIP because there's a case this doesn't fix

@Rich-Harris Rich-Harris marked this pull request as ready for review August 30, 2019 17:49
@transition_in(${name}, 1);`}
}
`;
if (!branch.dependencies || branch.dependencies.length > 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When is branch.dependencies falsy? It seems weird to do something when it's falsy or it's a non-empty array.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's falsy when the condition is simple (e.g. {#if foo}). I've changed that so that it's always there — makes a bit more sense now

@codecov-io
Copy link

Codecov Report

Merging #3478 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3478   +/-   ##
=======================================
  Coverage   50.25%   50.25%           
=======================================
  Files           1        1           
  Lines         197      197           
=======================================
  Hits           99       99           
  Misses         98       98

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8977da8...c5e117a. Read the comment docs.

@Rich-Harris Rich-Harris merged commit d75b638 into master Sep 4, 2019
@Rich-Harris Rich-Harris deleted the gh-3447 branch September 4, 2019 01:30
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.

Can not compile complex {#if}
4 participants