Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/suggester/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,10 @@ const suggestViaGitHub = async ({

const alreadyExists = existingComments.some(comment => {
const isSameBody = comment.body === request.body
const isSameStartLineLine = comment.start_line === request.start_line
// NOTE: == is intentional, we want to treat undefined and null as equal
const isSameStartLine = comment.start_line == request.start_line
const isSameEndLine = comment.line === request.line
const isSame = isSameBody && isSameStartLineLine && isSameEndLine
const isSame = isSameBody && isSameStartLine && isSameEndLine
return isSame
})

Expand Down