fix: [code-836]: fix issue where code comments cant be added (#420)

This commit is contained in:
Calvin Lee 2023-09-08 23:48:29 +00:00 committed by Harness
parent 4b36713c0d
commit 32888b07ce
2 changed files with 3 additions and 2 deletions

View File

@ -143,7 +143,8 @@ export function getCommentLineInfo(
) { ) {
const isSideBySideView = viewStyle === ViewStyle.SIDE_BY_SIDE const isSideBySideView = viewStyle === ViewStyle.SIDE_BY_SIDE
const { left, lineNumber, filePath } = commentEntry const { left, lineNumber, filePath } = commentEntry
const filePathBody = contentDOM?.querySelector(`[data="${filePath}"`) console.log(commentEntry)
const filePathBody = filePath ? contentDOM?.querySelector(`[data="${filePath}"`) : contentDOM
const diffBody = filePathBody?.querySelector( const diffBody = filePathBody?.querySelector(
`${isSideBySideView ? `.d2h-file-side-diff${left ? '.left' : '.right'} ` : ''}.d2h-diff-tbody` `${isSideBySideView ? `.d2h-file-side-diff${left ? '.left' : '.right'} ` : ''}.d2h-diff-tbody`

View File

@ -286,7 +286,7 @@ export default function Webhooks() {
showWhen={() => webhooks?.length === 0} showWhen={() => webhooks?.length === 0}
forSearch={!!searchTerm} forSearch={!!searchTerm}
message={getString('webhookEmpty')} message={getString('webhookEmpty')}
buttonText={getString('createWebhook')} buttonText={getString('newWebhook')}
onButtonClick={() => onButtonClick={() =>
history.push( history.push(
routes.toCODEWebhookNew({ routes.toCODEWebhookNew({