Skip to content

Commit

Permalink
Merge pull request #1864 from tactilenews/1863_fix_missing_target_error
Browse files Browse the repository at this point in the history
Fix missing stimulus target error
  • Loading branch information
mattwr18 authored May 16, 2024
2 parents 9f288da + 761a5c1 commit 2bbef1e
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 2bbef1e

Please sign in to comment.