fixed js bug on copy code module

This commit is contained in:
Nuno Coração 2022-10-04 15:42:14 +01:00
parent fe032dac59
commit 0e25bec4e7

View file

@ -1,6 +1,6 @@
var scriptBundle = document.getElementById("script-bundle");
var copyText = scriptBundle ? scriptBundle.getAttribute("data-copy") : "Copy";
var copiedText = scriptBundle ? scriptBundle.getAttribute("data-copied") : "Copied";
var copyText = scriptBundle && scriptBundle.getAttribute("data-copy")? scriptBundle.getAttribute("data-copy") : "Copy";
var copiedText = scriptBundle && scriptBundle.getAttribute("data-copied")? scriptBundle.getAttribute("data-copied") : "Copied";
function createCopyButton(highlightDiv) {
const button = document.createElement("button");