Commit bd87f7e
fix(server): guard traverseContractProcedures against null/undefined exports
getHiddenRouterContract reads a symbol property and throws on null or
undefined. Recursing into a child export of `null` (e.g.
`export const X = null`) crashed before any guard ran. Move the
typeof/null guard above the hidden-contract lookup, and update the test
to use a fixture containing null/undefined so the crash path is covered.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 92b7eab commit bd87f7e
2 files changed
+11
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
| 293 | + | |
303 | 294 | | |
304 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
305 | 298 | | |
306 | 299 | | |
307 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
195 | 202 | | |
196 | 203 | | |
197 | 204 | | |
| |||
0 commit comments