Skip to content

Commit 83a41f0

Browse files
committed
Fkx lint
Signed-off-by: Yarden Shoham <[email protected]>
1 parent 7cd16ae commit 83a41f0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

web_src/js/features/common-global.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,11 @@ export function initGlobalButtons() {
346346

347347
// get raw text for copy content button
348348
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);
349+
if (copyContentButtons.length !== 0) {
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);
353+
}
353354
}
354355
}
355356

0 commit comments

Comments
 (0)