Repository navigation
Commit 2ec06ca
committed
feat(javascript): fold optional calls of a nullish const in the minifier
terser reads a variable as nullish only when its fixed value is stored as a
node, so a `const d = void 0` read more than once keeps every `d?.(…)`.
Refs terser/terser#14001 parent cf97e07 commit 2ec06ca
3 files changed
Lines changed: 16 additions & 2 deletions
File tree
- .changeset
- lib/javascript
- test/unitCases
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37622 | 37622 | | |
37623 | 37623 | | |
37624 | 37624 | | |
37625 | | - | |
| 37625 | + | |
| 37626 | + | |
| 37627 | + | |
| 37628 | + | |
| 37629 | + | |
| 37630 | + | |
| 37631 | + | |
| 37632 | + | |
| 37633 | + | |
37626 | 37634 | | |
37627 | 37635 | | |
37628 | 37636 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
236 | 242 | | |
237 | 243 | | |
238 | 244 | | |
| |||
0 commit comments