Commit 654a758
sqlite3: guard empty token list in translateDotCommand
The destructured `head` is typed `string` but is actually `string |
undefined` if `tokens` is empty (TypeScript's index-signature inference
hides this). The caller's `/^\.[a-zA-Z]/` guard means tokens is always
non-empty in practice, but add an explicit check so a future caller
change can't surface as a confusing "unknown command: undefined"
error from the switch's default branch.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 6ae1657 commit 654a758
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
| |||
0 commit comments