We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7cd16ae commit 83a41f0Copy full SHA for 83a41f0
web_src/js/features/common-global.js
@@ -346,10 +346,11 @@ export function initGlobalButtons() {
346
347
// get raw text for copy content button
348
const copyContentButtons = document.querySelectorAll('button.copy-content');
349
- if (copyContentButtons.length == 0) return;
350
- const text = Array.from(document.querySelectorAll('.lines-code')).map((el) => el.textContent).join('');
351
- for (const copyContentButton of copyContentButtons) {
352
- copyContentButton.setAttribute('data-clipboard-text', text);
+ if (copyContentButtons.length !== 0) {
+ const text = Array.from(document.querySelectorAll('.lines-code')).map((el) => el.textContent).join('');
+ for (const copyContentButton of copyContentButtons) {
+ copyContentButton.setAttribute('data-clipboard-text', text);
353
+ }
354
}
355
356
0 commit comments