Skip to content

Commit 77abd41

Browse files
committed
addressed comment
1 parent 29e7509 commit 77abd41

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/core/src/amazonq/webview/ui/apps/testChatConnector.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export interface MessageData {
3636
}
3737
// TODO: Refactor testChatConnector, scanChatConnector and other apps connector files post RIV
3838
export class Connector extends BaseConnector {
39-
connector: any
4039
override getTabType(): TabType {
4140
return 'testgen'
4241
}
@@ -109,6 +108,9 @@ export class Connector extends BaseConnector {
109108
}
110109

111110
onFileDiff = (tabID: string, filePath: string, deleted: boolean, messageId?: string): void => {
111+
if (this.onChatAnswerReceived === undefined) {
112+
return
113+
}
112114
// Open diff view
113115
this.sendMessageToExtension({
114116
command: 'open-diff',
@@ -118,7 +120,7 @@ export class Connector extends BaseConnector {
118120
messageId,
119121
tabType: 'testgen',
120122
})
121-
this.onChatAnswerReceived?.(
123+
this.onChatAnswerReceived(
122124
tabID,
123125
{
124126
type: ChatItemType.ANSWER,

0 commit comments

Comments
 (0)