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

0.49.0 breaks code when conditionally returning boolean values in functions #1588

Closed
swernerx opened this issue Aug 28, 2017 · 2 comments
Closed

Comments

@swernerx
Copy link
Contributor

swernerx commented Aug 28, 2017

Rollup is breaking my prepublish tool with the newest 0.49 - this is probably related to the new tree shaking which might be a little too intensive ;)

Input:

export function helper(value) {
  if (value) {
    return true
  }

  somethingElse()
}

Output:

function helper(value) {
  somethingElse();
}

export { helper };

REPL Link

It seems to affect boolean returns somehow... problem goes away when executing some other function.

@swernerx swernerx changed the title 0.49 breaks code when comparing local to global values 0.49 breaks code when conditionally returning boolean values in functions Aug 28, 2017
@swernerx swernerx changed the title 0.49 breaks code when conditionally returning boolean values in functions 0.49.0 breaks code when conditionally returning boolean values in functions Aug 28, 2017
swernerx added a commit to sebastian-software/prepublish that referenced this issue Aug 28, 2017
@Rich-Harris
Copy link
Contributor

Fixed in 0.49.1 😀

@dherges
Copy link
Contributor

dherges commented Aug 30, 2017

@Rich-Harris @lukastaegert and all the others involved: Thanks for the quick work to get the regressions fixed!

I think I hit the #1585 and #1588 and can confirm that it is now working again!

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

No branches or pull requests

3 participants