diff options
Diffstat (limited to 'app/assets/javascripts/behaviors')
-rw-r--r-- | app/assets/javascripts/behaviors/copy_code.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/behaviors/copy_code.js b/app/assets/javascripts/behaviors/copy_code.js index 0c81ae63f21..970864eef74 100644 --- a/app/assets/javascripts/behaviors/copy_code.js +++ b/app/assets/javascripts/behaviors/copy_code.js @@ -8,7 +8,7 @@ class CopyCodeButton extends HTMLElement { this.for = uniqueId('code-'); const target = this.parentNode.querySelector('pre'); - if (!target) return; + if (!target || this.closest('.suggestions')) return; target.setAttribute('id', this.for); |