Repository navigation
Commit 88296b9
committed
fix(compiler): skip timeZone check when first arg is a spread in strong render policy
When the first argument to toLocaleString/DateTimeFormat is a SpreadElement,
args[1] is undefined, causing missingTimeZone to return true and report a
false positive. A spread can supply both locale and options, so the compiler
cannot prove the timeZone is absent -- fail open per the existing convention.1 parent 757aa6e commit 88296b9
2 files changed
Lines changed: 10 additions & 2 deletions
File tree
- packages/octane
- src/compiler
- tests/compiler
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| |||
253 | 255 | | |
254 | 256 | | |
255 | 257 | | |
256 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
257 | 263 | | |
258 | 264 | | |
259 | 265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
| 311 | + | |
310 | 312 | | |
311 | 313 | | |
312 | 314 | | |
| |||
0 commit comments