Skip to content

Commit

Permalink
fix debug
Browse files Browse the repository at this point in the history
  • Loading branch information
beyang committed May 21, 2023
1 parent c57725a commit a371fa5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/cody/src/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export function debug(filterLabel: string, text: string, ...args: unknown[]): vo
return
}

const lastArg = args[-1]
if (typeof lastArg === 'object' && lastArg && 'verbose' in lastArg) {
const lastArg = args[args.length - 1]
if (lastArg && typeof lastArg === 'object' && 'verbose' in lastArg) {
if (config.debugVerbose) {
outputChannel.appendLine(
`${filterLabel}: ${text} ${args.slice(0, -1).join(' ')} ${JSON.stringify(lastArg.verbose)}`
Expand Down

0 comments on commit a371fa5

Please sign in to comment.