-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Rollup lost an entire piece of code #3533
Labels
Comments
If code is missing, then Rollup did not find a side-effect. The important part would be to see the original code of the |
Concerning the original code of the monitor function, here it is: monitor() {
const persons = [this.bob, this.alice, this.charlie, this.david]
const list = persons.filter(person => person.isPark)
list.forEach(p => {
list.forEach(pp => {
if (p == pp) {
return
}
const diffX = p.x - pp.x;
const diffY = p.y - pp.y;
const dist = Math.sqrt(diffX * diffX + diffY * diffY);
if (dist <= 40) {
this.contact(p, pp)
}
})
})
} |
9 tasks
Thanks again, pending fix at #3539 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is the REPL link.
I didn't past all my code as it's private, but this roughly what happened. Here are screenshots of the result I'm getting:
I managed to find a workaround by not having a
list
constant:Expected Behavior
Rollup should always keep the code when not certain if it's accessible or not. So it doesn't lose any important code
Actual Behavior
Inside a class, Rollup lost an entire piece of code for no reason. Maybe Rollup thought that the code wasn't accessible.
The text was updated successfully, but these errors were encountered: