Repository navigation
Commit 68e330f
committed
fix(web): collapse redundant png fallback in deriveImageFilenameFromUrl
Cursor Bugbot caught the `|| "png"` on `const ext = subtype || "png"`
being dead code: `subtype` already had the same fallback on the line
above, so `ext === subtype` always. This is the same "redundant fallback
that reads defensive but isn't" shape worth remembering for future
reviews.
Also moved the extension lookup below the "already has an extension"
early return — we only need an inferred extension when we're about to
append one.
No behavior change. Existing tests still cover both branches.1 parent 42d36da commit 68e330f
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
393 | | - | |
394 | 392 | | |
| 393 | + | |
395 | 394 | | |
396 | 395 | | |
397 | 396 | | |
0 commit comments