Commit c797f3b
committed
Fix empty-targets lookup name var; fail-fast on empty Union/Intersection
Restore handling for lookups whose metadata returns an empty Targets array
(e.g. owningbusinessunit in some Dataverse environments). The refactor in
febde1c dropped the explicit Some [||] -> None guard, causing
getLookupNameVars to render TsType.Union [] as the empty string and emit
broken TypeScript. Type as string when targets are empty.
Also guard TsStringUtil so empty Union/Intersection lists fail at generation
time instead of producing invalid output silently.1 parent febde1c commit c797f3b
2 files changed
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
233 | 236 | | |
234 | 237 | | |
235 | 238 | | |
236 | | - | |
| 239 | + | |
237 | 240 | | |
238 | 241 | | |
239 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
0 commit comments