Commit 5f5c1e4
committed
Defend entity type lookups against nullish IDs
Make the generated getEntityTypeById() helper return undefined for
unexpected nullish inputs instead of crashing on href access. Also add
a regression test for nullish calls and refresh the generator
snapshots.
#681
Assisted-by: OpenCode:gpt-5.41 parent ce155c3 commit 5f5c1e4
6 files changed
Lines changed: 13 additions & 5 deletions
File tree
- packages
- vocab-tools/src
- __snapshots__
- vocab/src
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95871 | 95871 | | |
95872 | 95872 | | |
95873 | 95873 | | |
95874 | | - | |
| 95874 | + | |
95875 | 95875 | | |
95876 | 95876 | | |
95877 | 95877 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95869 | 95869 | | |
95870 | 95870 | | |
95871 | 95871 | | |
95872 | | - | |
| 95872 | + | |
95873 | 95873 | | |
95874 | 95874 | | |
95875 | 95875 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95871 | 95871 | | |
95872 | 95872 | | |
95873 | 95873 | | |
95874 | | - | |
| 95874 | + | |
95875 | 95875 | | |
95876 | 95876 | | |
95877 | 95877 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
28 | 36 | | |
0 commit comments