Skip to content

Commit

Permalink
Fix missing stimulus target error
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwr18 committed May 14, 2024
1 parent 26719c5 commit 761a5c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/components/chat_message/chat_message.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export default class extends Controller {
}

setCopyValue() {
if (!this.hasCopyButtonTarget) return;

const text = this.textTarget.innerText;

const sender = this.senderNameValue;
Expand All @@ -69,6 +71,8 @@ export default class extends Controller {
}

setCopyUrlValue() {
if (!this.hasCopyButtonTarget) return;

this.copyButtonTarget.dataset.copyButtonCopyValue = this.copyUrlValue;
}

Expand Down

0 comments on commit 761a5c1

Please sign in to comment.