Commit 6585463
committed
fix(minifier): always keep the last value of sequence expression (#8490)
Caught in react app:
```
React.useEffect(() => {
isMountRef.current = false;
return () => {
isMountRef.current = true;
};
}, []);
```
->
```
React.useEffect(() => isMountRef.current = !1, []);
```
Two problems: there were no unit tests guarding this, no good way of knowing when code gets deleted.1 parent 3174675 commit 6585463
1 file changed
Lines changed: 3 additions & 6 deletions
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
500 | | - | |
501 | 499 | | |
502 | 500 | | |
503 | 501 | | |
| |||
510 | 508 | | |
511 | 509 | | |
512 | 510 | | |
513 | | - | |
514 | | - | |
515 | | - | |
| 511 | + | |
516 | 512 | | |
517 | 513 | | |
518 | 514 | | |
| |||
529 | 525 | | |
530 | 526 | | |
531 | 527 | | |
532 | | - | |
| 528 | + | |
533 | 529 | | |
534 | 530 | | |
535 | 531 | | |
| |||
744 | 740 | | |
745 | 741 | | |
746 | 742 | | |
| 743 | + | |
747 | 744 | | |
748 | 745 | | |
749 | 746 | | |
| |||
0 commit comments