Commit 2bede6c
fix(status-line): guard messagesRef.current against null
messagesRef.current is typed as Message[] | null per React's RefObject.
doesMostRecentAssistantMessageExceed200k() and getCurrentUsage() expect
Message[], not null. Add ?? [] fallback to prevent runtime error.
Addresses CodeRabbit finding on PR #51.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 951e12a commit 2bede6c
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments