Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfung committed Dec 23, 2024
1 parent 6ec7614 commit dd8608d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ee/tabby-ui/lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ export function getRangeFromAttachmentCode(code: {
startLine?: Maybe<number>
content: string
}): LineRange | undefined {
if (!code?.startLine) return undefined
if (!code?.startLine || typeof code.startLine !== 'number') return undefined

const start = code.startLine
const lineCount = code.content.split('\n').length
const end = typeof start === 'number' ? start + lineCount - 1 : 0
const end = start + lineCount - 1

return {
start,
Expand Down

0 comments on commit dd8608d

Please sign in to comment.