mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: replace confusing logHandle! with proper undefined type
This commit is contained in:
parent
87546c9fce
commit
e24cd0de81
1 changed files with 2 additions and 2 deletions
|
|
@ -99,7 +99,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
|
|||
: {}
|
||||
|
||||
// Variable to hold the log handle - will be created after request body is built
|
||||
let logHandle: ReturnType<typeof this.inferenceLogger.start>
|
||||
let logHandle: ReturnType<typeof this.inferenceLogger.start> | undefined
|
||||
|
||||
try {
|
||||
switch (modelId) {
|
||||
|
|
@ -379,7 +379,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
|
|||
})
|
||||
} catch (error) {
|
||||
// logHandle may not be assigned if error occurs before request body is built
|
||||
if (logHandle!) {
|
||||
if (logHandle) {
|
||||
logHandle.error(error)
|
||||
}
|
||||
throw error
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue