Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
justjais committed Dec 9, 2024
1 parent 385fb22 commit 5aebacd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ansible_ai_connect_chatbot/src/useChatbot/useChatbot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,12 @@ export const useChatbot = () => {
},
copy: {
onClick: () => {
message.actions.copy.isDisabled = true;
navigator.clipboard.writeText(response.response)
if (message.actions) {
message.actions.copy.isDisabled = true;
message.actions.negative.className = "action-button-clicked";
navigator.clipboard.writeText(typeof response === "object" ? response.response : response);

Check failure on line 175 in ansible_ai_connect_chatbot/src/useChatbot/useChatbot.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `typeof·response·===·"object"·?·response.response·:·response` with `⏎··············typeof·response·===·"object"·?·response.response·:·response,⏎············`
}

Check failure on line 176 in ansible_ai_connect_chatbot/src/useChatbot/useChatbot.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `⏎`

},
},
};
Expand Down

0 comments on commit 5aebacd

Please sign in to comment.