Skip to content

Commit

Permalink
Fkx lint
Browse files Browse the repository at this point in the history
Signed-off-by: Yarden Shoham <[email protected]>
  • Loading branch information
yardenshoham committed Oct 30, 2022
1 parent 7cd16ae commit 83a41f0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions web_src/js/features/common-global.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,11 @@ export function initGlobalButtons() {

// get raw text for copy content button
const copyContentButtons = document.querySelectorAll('button.copy-content');
if (copyContentButtons.length == 0) return;
const text = Array.from(document.querySelectorAll('.lines-code')).map((el) => el.textContent).join('');
for (const copyContentButton of copyContentButtons) {
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);
}
}
}

Expand Down

0 comments on commit 83a41f0

Please sign in to comment.