Commit 00700a3
fix: use nested .get() calls to handle falsy values correctly
Addresses Gemini Code Assist review feedback:
- Changed `or` fallbacks to nested `.get()` calls to avoid bugs with falsy values
- Empty dict `{}` for attributes is valid and should not fall back
- Empty string `''` for state is valid and should not fall back
The nested `.get(key1, .get(key2, default))` pattern only falls back when
the key is missing, not when the value is falsy, which is the correct behavior.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 65d5e93 commit 00700a3
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
332 | | - | |
| 331 | + | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| |||
0 commit comments